qprof 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/qprof/version.rb +1 -1
  3. data/lib/qprof.rb +3 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eba13a9e8805624a466be10b5946b5950027b7286ccbfca3a1fab8c2404d4d69
4
- data.tar.gz: 7d8f976ac93bf6b6eacf2a3704be13bb99023c86f1da32777dfb5feb0d509cad
3
+ metadata.gz: 327742d10634cd1a5fe27eec465dbe7edd7d64fb48983a898a00c32c2cb09dfd
4
+ data.tar.gz: 4c60c8563bb095496825124e73845ba2289c586dd275ea709cd91f079a6bacd6
5
5
  SHA512:
6
- metadata.gz: de01a49071899ffa76a4382122b79bcfec6d5fe47610079dc69060247cf6ff8dee222382992ca56900694dbe054f141e812a1bf56ed052e3e55a43960804fd65
7
- data.tar.gz: d5b92d65c04f3ffbb1f7791928e0714cb3de2ce29eeb4cc79dd76e70c4af2d0aaa36e34cf5d5e54a2a2373ec759e3346bf356ff2f00a296b3afc7c40895ae022
6
+ metadata.gz: 36105475ebb5fd15282b7af5896709904f1a68ac106483f7a90b7c656fc0d243bf7c640d57d02b14c5e12d79524a8d81fdeee950e5ee4a9225ff8c2c6314be4a
7
+ data.tar.gz: 136a82998d683bd7c33172b13f595c587a9aa009de0c47857a6e1049800cb349918efb5b7b432bcd0cb964100dbc05006c0329c281325acc4f148a84fd81df54
data/lib/qprof/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module QProf
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
data/lib/qprof.rb CHANGED
@@ -18,8 +18,8 @@ module QProf
18
18
 
19
19
  `git clone https://github.com/brendangregg/FlameGraph.git #{File.dirname(flamegraph_pl_path)}` unless File.exist?(flamegraph_pl_path)
20
20
 
21
- result = RubyProf.profile do
22
- @benchmark = Benchmark.measure do
21
+ @benchmark = Benchmark.measure do
22
+ @result = RubyProf.profile do
23
23
  yield
24
24
  end
25
25
  end
@@ -27,7 +27,7 @@ module QProf
27
27
  subtitle = %i[utime stime real]
28
28
  .map { |x| "#{x} = #{@benchmark.send(x).round(4)}s" }
29
29
  .join('; ')
30
- printer = RubyProf::FlameGraphPrinter.new(result)
30
+ printer = RubyProf::FlameGraphPrinter.new(@result)
31
31
  File.open(run_txt_path, 'w') { |file| printer.print(file) }
32
32
  `cat #{run_txt_path} | #{flamegraph_pl_path} --title \"#{title}\" --subtitle \"#{subtitle}\" > #{run_svg_path}`
33
33
  Launchy.open(run_svg_path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qprof
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - graham otte