perb 0.1.0 → 0.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d147f0306e6a9c9c89cce4dcc30ff7ecdf85fb1c08f4942f234f1b84bff5d58
4
- data.tar.gz: 7d4e5dbb2011da49b6cd67cd1284afef481f5fe0459bca730393ff1d2fd635e3
3
+ metadata.gz: 1af6d25669b97b00b175596bb8f93ab6d27c9615f34140b45b979d248be94845
4
+ data.tar.gz: 32c8c1c0b6e425724bcb0c7a1a15cd9ce31f7191540246e833630f1e87f90369
5
5
  SHA512:
6
- metadata.gz: 6426988554b37d64140c11697a61e9b72ee19c34aeda5932800489216bda776e8b449a04905bd86bbb9a8aaab325f980a3f08fcb06fda6dd58f89359d051776b
7
- data.tar.gz: 16ee173e6f09fb4c877271f35b74a8a6f2c982e9ac321607779a87dd1f5f5232f4a1e1f64993dbda97376329bc2e7846cd7d786ea7467c5e34daa932971e5a9c
6
+ metadata.gz: cf39c9b2b3cd35998ddd0899f99ee394abb44b3eb12b9170e0b96aa2d5b37ab2efac2c4c8790263280848694276ebce2976de8b950a4be1eea0f3f11c84a87bb
7
+ data.tar.gz: ba382cc7dba7681a20edc312915f00181a24f199456b597e7b372839c1efc196603203f9cf7efb552dd1b4222db0692dcd0ef4160c7df26ee8109b34b3821b4e
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- perb (0.1.0)
5
- parser (~> 3.1)
6
- rb_sys (~> 0.9.39)
4
+ perb (0.3.0)
5
+ parser (~> 3.2)
6
+ rb_sys (~> 0.9.53)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -13,27 +13,27 @@ GEM
13
13
  language_server-protocol (3.17.0.2)
14
14
  minitest (5.16.3)
15
15
  parallel (1.22.1)
16
- parser (3.1.3.0)
16
+ parser (3.2.0.0)
17
17
  ast (~> 2.4.1)
18
18
  prettier_print (1.1.0)
19
19
  rainbow (3.1.1)
20
20
  rake (13.0.6)
21
21
  rake-compiler (1.2.1)
22
22
  rake
23
- rb_sys (0.9.52)
23
+ rb_sys (0.9.53)
24
24
  regexp_parser (2.6.1)
25
25
  rexml (3.2.5)
26
- rubocop (1.40.0)
26
+ rubocop (1.42.0)
27
27
  json (~> 2.3)
28
28
  parallel (~> 1.10)
29
29
  parser (>= 3.1.2.1)
30
30
  rainbow (>= 2.2.2, < 4.0)
31
31
  regexp_parser (>= 1.8, < 3.0)
32
32
  rexml (>= 3.2.5, < 4.0)
33
- rubocop-ast (>= 1.23.0, < 2.0)
33
+ rubocop-ast (>= 1.24.1, < 2.0)
34
34
  ruby-progressbar (~> 1.7)
35
35
  unicode-display_width (>= 1.4.0, < 3.0)
36
- rubocop-ast (1.24.0)
36
+ rubocop-ast (1.24.1)
37
37
  parser (>= 3.1.1.0)
38
38
  ruby-lsp (0.3.7)
39
39
  language_server-protocol (~> 3.17.0)
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Perb
2
2
 
3
- Perb instruments your methods such that they show up when a ruby executable gets profiled with perf. it works by
3
+ `perb` automatically instruments your methods such that they show up when a ruby executable gets profiled with perf. it works by
4
4
  wrapping all methods with:
5
5
 
6
6
  ```ruby
@@ -50,7 +50,7 @@ want to be able to profile. See `bin/perf_test` as an example. Then you can just
50
50
  perf record -g <your-ruby-executable>
51
51
  ```
52
52
 
53
- and you should be able to profile native and ruby code with one profile.
53
+ and you should be able to profile native and ruby code with one profiler (perf).
54
54
 
55
55
  ## Caveats
56
56
 
@@ -72,7 +72,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
72
72
 
73
73
  ## Contributing
74
74
 
75
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/perb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/perb/blob/master/CODE_OF_CONDUCT.md).
75
+ Bug reports and pull requests are welcome on GitHub at https://github.com/Maaarcocr/perb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/Maaarcocr/perb/blob/master/CODE_OF_CONDUCT.md).
76
76
 
77
77
  ## License
78
78
 
@@ -80,4 +80,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
80
80
 
81
81
  ## Code of Conduct
82
82
 
83
- Everyone interacting in the Perb project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/perb/blob/master/CODE_OF_CONDUCT.md).
83
+ Everyone interacting in the Perb project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Maaarcocr/perb/blob/master/CODE_OF_CONDUCT.md).
data/ext/perb/Cargo.lock CHANGED
@@ -247,18 +247,18 @@ dependencies = [
247
247
 
248
248
  [[package]]
249
249
  name = "rb-sys"
250
- version = "0.9.52"
250
+ version = "0.9.53"
251
251
  source = "registry+https://github.com/rust-lang/crates.io-index"
252
- checksum = "02fffdb0162fc4cc1b6509b2d9b32a75f7e7ed392f58bde639e0c33b23e74b97"
252
+ checksum = "aa291f69bcc44f8e96597a3f39e9933fde6977b825415cfaa670ac49b8ab7c99"
253
253
  dependencies = [
254
254
  "rb-sys-build",
255
255
  ]
256
256
 
257
257
  [[package]]
258
258
  name = "rb-sys-build"
259
- version = "0.9.52"
259
+ version = "0.9.53"
260
260
  source = "registry+https://github.com/rust-lang/crates.io-index"
261
- checksum = "85d1a236755f879fc155d16d9ba4cd3b1975fd52ef6a28113702ae3881b73c03"
261
+ checksum = "d998fd6ef588471d6d7cca24c4da88eda5e6757b6885c55760e856ecdb254c3d"
262
262
  dependencies = [
263
263
  "bindgen",
264
264
  "regex",
data/ext/perb/Cargo.toml CHANGED
@@ -10,7 +10,7 @@ crate-type = ["cdylib"]
10
10
 
11
11
  [dependencies]
12
12
  magnus = { version = "0.4", features = ["rb-sys-interop"] }
13
- rb-sys = "0.9.52"
13
+ rb-sys = "0.9.53"
14
14
  dynasmrt = "1"
15
15
  once_cell = "1"
16
16
 
data/lib/perb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Perb
4
- VERSION = "0.1.0"
4
+ VERSION = "0.3.0"
5
5
  end
data/lib/perb.rb CHANGED
@@ -19,7 +19,7 @@ module Perb
19
19
  return if block.nil?
20
20
 
21
21
  insert_before(block.loc.expression, "Perb::wrapper(#{Perb.build_wrapper(method_info)}) do\n")
22
- insert_after(block.loc.expression, "\nend")
22
+ insert_after(node.loc.expression, "\nend")
23
23
  end
24
24
  end
25
25
  end
@@ -35,7 +35,7 @@ module Perb
35
35
 
36
36
  ast = parser.parse(source)
37
37
  source = rewriter.rewrite(source, ast)
38
- RubyVM::InstructionSequence.compile(source)
38
+ RubyVM::InstructionSequence.compile(source, path, path)
39
39
  end
40
40
  end
41
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Concetto Rudilosso
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-12-28 00:00:00.000000000 Z
12
+ date: 2023-01-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parser
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '3.1'
20
+ version: '3.2'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '3.1'
27
+ version: '3.2'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rb_sys
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.9.39
34
+ version: 0.9.53
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.9.39
41
+ version: 0.9.53
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rake-compiler
44
44
  requirement: !ruby/object:Gem::Requirement