knapsack 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +28 -1
- data/lib/knapsack/presenter.rb +4 -2
- data/lib/knapsack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e0c6e0155db9874413db7e03df64a0f62c8f185
|
4
|
+
data.tar.gz: a668e3c36473d5c6422352974b546de613e12dca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62b7636c2a124a66bb7e794a55cf1af786f98a5991dbdec997a1ff9b0f8b4d189f2e12c11958598ecd68305e01df515e398eb59b0ce1bf88023033b2f6107df5
|
7
|
+
data.tar.gz: df7ac31711b33ea9b2252fe67fb2e88ec75db0679e43154adb74587456feaad26b7ad173705361ba7e7fd05547875b7392eb725e8644281b0deccbf711121861
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -21,7 +21,7 @@ Presentations about gem:
|
|
21
21
|
* [X 2014 Kraków Ruby User Group](http://slides.com/arturt/parallel-tests-in-comparable-time)
|
22
22
|
* [VII 2014 Lunar Logic Dev Meeting](http://slides.com/arturt/knapsack)
|
23
23
|
|
24
|
-
**Would you like to try [knapsack_pro gem](https://github.com/KnapsackPro/knapsack_pro-ruby) with more features and free access for beta users? Please [
|
24
|
+
**Would you like to try [knapsack_pro gem](https://github.com/KnapsackPro/knapsack_pro-ruby) with more features and free access for beta users? Please [visit Knapsack Pro](http://knapsackpro.com).**
|
25
25
|
|
26
26
|
### Without Knapsack
|
27
27
|
|
@@ -67,6 +67,7 @@ Presentations about gem:
|
|
67
67
|
- [Info for snap-ci.com users](#info-for-snap-cicom-users)
|
68
68
|
- [Step 1](#step-1-4)
|
69
69
|
- [Step 2](#step-2-4)
|
70
|
+
- [FAQ](#faq)
|
70
71
|
- [Gem tests](#gem-tests)
|
71
72
|
- [Spec](#spec)
|
72
73
|
- [Spec examples](#spec-examples)
|
@@ -489,6 +490,31 @@ Knapsack supports snap-ci.com ENVs `SNAP_WORKER_TOTAL` and `SNAP_WORKER_INDEX`.
|
|
489
490
|
# Step for Minitest
|
490
491
|
bundle exec rake knapsack:minitest
|
491
492
|
|
493
|
+
## FAQ
|
494
|
+
|
495
|
+
* What time offset warning means?
|
496
|
+
|
497
|
+
At the end of tests execution results you can see warning like this:
|
498
|
+
|
499
|
+
```
|
500
|
+
========= Knapsack Time Offset Warning ==========
|
501
|
+
Time offset: 30s
|
502
|
+
Max allowed node time execution: 02m 30s
|
503
|
+
Exceeded time: 37s
|
504
|
+
```
|
505
|
+
|
506
|
+
`Time offset: 30s` - this is the current time offset value, by default it’s 30s. Let’s assume whole test suite takes 4 minutes and you do split across 2 CI nodes so the optimal split is 2 minutes per node. Time offset 30s means when tests on single CI node will take longer than 2 minutes and 30s then you see warning about regenerating report because probably test suite files changed and the knapsack report contains old time execution data about each test file so regenerating knapsack report should help you provide a more optimal test suite split.
|
507
|
+
|
508
|
+
`Max allowed node time execution: 02m 30s` - it’s average time execution of tests per CI node + time offset. In this case average tests time execution per CI node is 2 minutes.
|
509
|
+
|
510
|
+
`Exceeded time: 37s` - it means tests on particular CI node took 37s longer than `max allowed node time execution`. Sometimes this value is negative when tests executed faster than `max allowed node time execution`.
|
511
|
+
|
512
|
+
If you want to regenerate report take a look [here](#common-step).
|
513
|
+
|
514
|
+
`KNAPSACK_GENERATE_REPORT=true bundle exec rspec spec`
|
515
|
+
|
516
|
+
If you run command like this on your development machine then test suite time execution might be different than if you generate a report on CI machine (for instance tests might be faster on your machine then on CI node) so that might be a reason why you see warning about regenerating report. You can generate the report on single CI node which should give you result specific for your CI node instead of your development machine. In case you don't want to bother about manually regenerating knapsack report please take a look on [knapsack_pro gem](http://knapsackpro.com).
|
517
|
+
|
492
518
|
## Gem tests
|
493
519
|
|
494
520
|
### Spec
|
@@ -534,3 +560,4 @@ Many thanks to [Małgorzata Nowak](https://github.com/informatykgosia) for beaut
|
|
534
560
|
* Semaphore | [Running RSpec specs in parallel](https://semaphoreapp.com/docs/running-rspec-specs-in-threads.html)
|
535
561
|
* Semaphore | [Running Cucumber scenarios in parallel](https://semaphoreapp.com/docs/running-cucumber-scenarios-in-threads.html)
|
536
562
|
* Buildkite | [Libraries](https://buildkite.com/docs/guides/parallelizing-builds#libraries)
|
563
|
+
* Snap CI | [Knapsack: optimal test suite split based on time execution](https://docs.snap-ci.com/speeding-up-builds/test-parallelism/#parallelism-using-third-party-tools%23knapsack-optimal-test-suite-split-based-on-time-execution)
|
data/lib/knapsack/presenter.rb
CHANGED
@@ -43,7 +43,7 @@ module Knapsack
|
|
43
43
|
}
|
44
44
|
if Knapsack.tracker.time_exceeded?
|
45
45
|
str << %{
|
46
|
-
Tests on this CI node took more than time
|
46
|
+
Tests on this CI node took more than max allowed node time execution.
|
47
47
|
Please regenerate your knapsack report.
|
48
48
|
If that didn't help then split your heavy test file
|
49
49
|
or bump time_offset_in_seconds setting.}
|
@@ -52,9 +52,11 @@ or bump time_offset_in_seconds setting.}
|
|
52
52
|
Global time execution for this CI node is fine.
|
53
53
|
Happy testing!}
|
54
54
|
end
|
55
|
+
str << "\n\nNeed explanation? See FAQ:"
|
56
|
+
str << "\nhttps://github.com/ArturT/knapsack#faq"
|
55
57
|
str << "\n=================================================\n"
|
56
58
|
str << %{Sign up for beta Knapsack Pro here:
|
57
|
-
http://
|
59
|
+
http://knapsackpro.com}
|
58
60
|
str << "\n=================================================\n"
|
59
61
|
str
|
60
62
|
end
|
data/lib/knapsack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knapsack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|