perf_check 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/perf_check +2 -1
- data/lib/perf_check/git.rb +7 -7
- data/lib/perf_check/server.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d4485198a9057ea60ba1525b6ac00a1ef202aa3
|
4
|
+
data.tar.gz: fb4528654f7042955e990f6f267b3378a03b5138
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6771cc650d1712c2308f56625b7f177edd1484cfbd57b368e8ca977974f2a9b45003ad7b49647233c25756528fa4a288384c7580279784146f86c76f95db4a9c
|
7
|
+
data.tar.gz: 70e0bcf7aa68b5161eb09096c2047113515170fb63a6a2a4130e9e4ffc1c141909276bdc5101ea0058992ffef0bb9a7a66446cfe218196a3aead3f004169497f
|
data/bin/perf_check
CHANGED
@@ -33,7 +33,8 @@ opts = OptionParser.new do |opts|
|
|
33
33
|
end
|
34
34
|
|
35
35
|
opts.separator "\nBenchmark options:"
|
36
|
-
opts.on('--requests N', '-n',
|
36
|
+
opts.on('--requests N', '-n',
|
37
|
+
'Use N requests in benchmark, defaults to 10') do |n|
|
37
38
|
options.number_of_requests = n.to_i
|
38
39
|
end
|
39
40
|
|
data/lib/perf_check/git.rb
CHANGED
@@ -11,7 +11,7 @@ class PerfCheck
|
|
11
11
|
def self.checkout_reference(reference='master')
|
12
12
|
checkout(reference)
|
13
13
|
at_exit do
|
14
|
-
puts
|
14
|
+
$stderr.puts
|
15
15
|
Git.checkout_current_branch
|
16
16
|
end
|
17
17
|
end
|
@@ -21,16 +21,16 @@ class PerfCheck
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.checkout(branch)
|
24
|
-
print "Checking out #{branch}... "
|
24
|
+
$stderr.print "Checking out #{branch}... "
|
25
25
|
`git checkout #{branch} --quiet`
|
26
|
-
|
26
|
+
abort "Problem with git checkout! Bailing..." unless $?.success?
|
27
27
|
end
|
28
28
|
|
29
29
|
def self.stash_if_needed
|
30
30
|
if anything_to_stash?
|
31
|
-
print("Stashing your changes... ")
|
31
|
+
$stderr.print("Stashing your changes... ")
|
32
32
|
system('git stash -q >/dev/null')
|
33
|
-
|
33
|
+
abort("Problem with git stash! Bailing...") unless $?.success?
|
34
34
|
at_exit do
|
35
35
|
Git.pop
|
36
36
|
end
|
@@ -44,9 +44,9 @@ class PerfCheck
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def self.pop
|
47
|
-
|
47
|
+
warn("Git stash applying...")
|
48
48
|
system('git stash pop -q')
|
49
|
-
|
49
|
+
abort("Problem with git stash! Bailing...") unless $?.success?
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
data/lib/perf_check/server.rb
CHANGED