perf_check 0.10.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7639921f7d799a3aec84d374c2564bb2a2581f57c36ecd44076e179b20037837
4
- data.tar.gz: 7a194a97b06717e99096f9dd7cb38b5366f34d498ddc21b911b4ef8f5d5677ec
3
+ metadata.gz: f56f0b0743b114ba97c7cf95a7a4e6c955aab1ee52089e55ceaa4766b6e45ff2
4
+ data.tar.gz: 734a1b4023df42c4c5892bdb3f1ea806088179f182f191f5cc920ac265e90199
5
5
  SHA512:
6
- metadata.gz: cc5f16dd2dfabc9b68ea71dcb5246ea5eb8e89cf849179d5a6ade720f838096f8e934c6ff237fb0154aff6f69243d307c839370f62034fd3c8f3182507ce5a2f
7
- data.tar.gz: c373a4e26c30ac2b04196f8609d350210a4742086cd90030120f1689e8fa6b75d85821da76db4bb72091986661ad5262d683e6013d41f4bd5a3f6066c69dec23
6
+ metadata.gz: da95a54d9480b7017b428c39d891a171656ec5a441410387fce03ddf06b6781bc069c02afbad1d2517aee2a6de39da15dd68b35322116703069abeb45e978ca5
7
+ data.tar.gz: 9e32ddf4449aeb1703c97e9520e993216f8da0c3f02ab3eaa605d2fc6910af52d524043f739d1567e85eb5e1b1b53fee8fb5182fef5d4cf029ce7080341ea0e3
@@ -24,6 +24,11 @@ class PerfCheck
24
24
  options.reference = commit
25
25
  end
26
26
 
27
+ opts.on('--branch COMMIT', '-branch',
28
+ 'Set the current branch to benchmark against (defaults to the branch you currently have checked out)') do |branch|
29
+ options.branch = branch
30
+ end
31
+
27
32
  opts.on('--quick', '-q',
28
33
  '20 requests just on this branch (no comparison with master)') do
29
34
  options.reference = nil
@@ -15,7 +15,7 @@ class PerfCheck
15
15
  @git_root = perf_check.app_root
16
16
  @logger = perf_check.logger
17
17
 
18
- @current_branch = exec "git rev-parse --abbrev-ref HEAD"
18
+ @current_branch = perf_check.options.branch || exec("git rev-parse --abbrev-ref HEAD")
19
19
  end
20
20
 
21
21
  def checkout(branch, bundle_after_checkout: true, hard_reset: false)
data/lib/perf_check.rb CHANGED
@@ -18,6 +18,7 @@ class PerfCheck
18
18
  @options = OpenStruct.new(
19
19
  number_of_requests: 20,
20
20
  reference: 'master',
21
+ branch: nil,
21
22
  cookie: nil,
22
23
  headers: {},
23
24
  http_statuses: [200],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perf_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - rubytune
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-08 00:00:00.000000000 Z
11
+ date: 2019-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec