cirron 0.2.3 → 0.2.5

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/README.md +37 -25
  3. data/cirron.gemspec +1 -1
  4. metadata +14 -44
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ace413f7a2b758fea74f6f99ac43a12efa277565f27e5ef4705b54545e15cac0
4
- data.tar.gz: c576234ae60f3afabda10d9eb6a40971c5cbd4c3b2fd2e52bff71b069e8d71c8
3
+ metadata.gz: 7fed1adda77ca40210f3cf1df4a4f3d3cbc0c73a8867d20eb56a74ae12bdfa1f
4
+ data.tar.gz: 806b8d8bca6b7491d86924f83b1194ac6be03b0dfab1ff887e157e380f19ccfe
5
5
  SHA512:
6
- metadata.gz: cf22c21bb660fa91b533ecb7bf29bdf2ffcb87647ad30c79ce57183cd98eaa13fbadf813303a9ad8c3ccc0bbba89a3ab21cc0ce238d614641016da7033242837
7
- data.tar.gz: 7da4cfca8d91f7a4776776f936fc361663f958c1a597a19211ed0837ae5ed2483e59d4625a64fa50086850766842402c4f3d11eb14eeda2c8c99cd49d3683ef9
6
+ metadata.gz: b87c86b710e56227512fbcc0938c0a1bbbb028e2366cc4f90123d759937dcd3aa64bca0f603f9269e50b633714b859c8ef563e541808f2c68a305a882a548074
7
+ data.tar.gz: 5b2024455cdc4591d7db609db12fa00b5be333a4d9ed09a2873a8212ba6909c84ab301b16563fe34af5464551f070df2960f50a792b68a38d570b9f6653217dc
data/README.md CHANGED
@@ -1,42 +1,54 @@
1
1
  == Cirron
2
- # Cirron
3
2
 
4
- Cirron measures a piece of Ruby code and report back several performance counters: CPU instruction count, branch misses, page faults and time spent measuring. It uses the Linux perf events interface or @ibireme's [KPC demo](https://gist.github.com/ibireme/173517c208c7dc333ba962c1f0d67d12) on OSX.
3
+ Cirron measures a piece of Ruby code and reports back several performance counters:
4
+ CPU instruction count, branch misses, page faults and time spent measuring.
5
+ It uses the Linux perf events interface or @ibireme's KPC demo[https://gist.github.com/ibireme/173517c208c7dc333ba962c1f0d67d12] on OSX.
5
6
 
6
- It can also trace syscalls using `strace`, Linux only!
7
7
 
8
- ## Prerequisites
8
+ It can also trace syscalls using +strace+, Linux only!
9
9
 
10
- - Linux with perf events support / Apple ARM OSX
11
- - C++
12
- - Ruby 3.x
13
10
 
14
- ## Usage
11
+ == Prerequisites
15
12
 
16
- ### Performance Counters
17
- ```
18
- from cirron import Collector
13
+ * Linux with perf events support / Apple ARM OSX
14
+ * C++
15
+ * Ruby 3.x
19
16
 
20
- # Start collecting performance metrics
21
- with Collector() as collector:
17
+
18
+ == Usage
19
+
20
+ === Performance Counters
21
+
22
+
23
+ require 'cirron'
24
+
25
+ # Start collecting performance metrics
26
+ Cirron::Collector.new do |collector|
22
27
  # Your code here
23
28
  # ...
29
+ end
30
+
31
+ # Retrieve the metrics
32
+ puts collector.counters
24
33
 
25
- # Retrieve the metrics
26
- print(collector.counters)
27
- ```
28
34
 
29
- ### Syscalls
30
- ```
31
- from cirron import Tracer, to_tef
35
+ === Syscalls
32
36
 
33
- with Tracer() as tracer:
37
+
38
+ require 'cirron'
39
+
40
+ Cirron::Tracer.new do |tracer|
34
41
  # Your code here
35
42
  # ...
43
+ end
44
+
45
+ # Stop collecting and retrieve the trace
46
+ puts tracer.trace
47
+
48
+ # Save the trace for ingesting to Perfetto
49
+ File.write("/tmp/trace", Cirron.to_tef(trace))
50
+
36
51
 
37
- # Stop collecting and retrieve the trace
38
- print(tracer.trace)
52
+ == Additional Information
39
53
 
40
- # Save the trace for ingesting to Perfetto
41
- open("/tmp/trace", "w").write(to_tef(trace))
42
- ```
54
+ For more detailed information, please visit the project's GitHub page: https://github.com/s7nfo/Cirron
data/cirron.gemspec CHANGED
@@ -6,7 +6,7 @@ require 'pathname'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = "cirron"
9
- spec.version = "0.2.3"
9
+ spec.version = "0.2.5"
10
10
  spec.authors = ["Matt Stuchlik"]
11
11
  spec.email = ["matej.stuchlik@gmail.com"]
12
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cirron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Stuchlik
@@ -10,49 +10,19 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2024-07-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: |
14
- == Cirron
15
- # Cirron
16
-
17
- Cirron measures a piece of Ruby code and report back several performance counters: CPU instruction count, branch misses, page faults and time spent measuring. It uses the Linux perf events interface or @ibireme's [KPC demo](https://gist.github.com/ibireme/173517c208c7dc333ba962c1f0d67d12) on OSX.
18
-
19
- It can also trace syscalls using `strace`, Linux only!
20
-
21
- ## Prerequisites
22
-
23
- - Linux with perf events support / Apple ARM OSX
24
- - C++
25
- - Ruby 3.x
26
-
27
- ## Usage
28
-
29
- ### Performance Counters
30
- ```
31
- from cirron import Collector
32
-
33
- # Start collecting performance metrics
34
- with Collector() as collector:
35
- # Your code here
36
- # ...
37
-
38
- # Retrieve the metrics
39
- print(collector.counters)
40
- ```
41
-
42
- ### Syscalls
43
- ```
44
- from cirron import Tracer, to_tef
45
-
46
- with Tracer() as tracer:
47
- # Your code here
48
- # ...
49
-
50
- # Stop collecting and retrieve the trace
51
- print(tracer.trace)
52
-
53
- # Save the trace for ingesting to Perfetto
54
- open("/tmp/trace", "w").write(to_tef(trace))
55
- ```
13
+ description: "== Cirron\n\nCirron measures a piece of Ruby code and reports back several
14
+ performance counters: \nCPU instruction count, branch misses, page faults and time
15
+ spent measuring. \nIt uses the Linux perf events interface or @ibireme's KPC demo[https://gist.github.com/ibireme/173517c208c7dc333ba962c1f0d67d12]
16
+ on OSX.\n\n\nIt can also trace syscalls using +strace+, Linux only!\n\n\n== Prerequisites\n\n*
17
+ Linux with perf events support / Apple ARM OSX\n* C++\n* Ruby 3.x\n\n\n== Usage\n\n===
18
+ Performance Counters\n\n\n require 'cirron'\n\n # Start collecting performance
19
+ metrics\n Cirron::Collector.new do |collector|\n # Your code here\n # ...\n
20
+ \ end\n\n # Retrieve the metrics\n puts collector.counters\n\n\n=== Syscalls\n\n\n
21
+ \ require 'cirron'\n\n Cirron::Tracer.new do |tracer|\n # Your code here\n #
22
+ ...\n end\n\n # Stop collecting and retrieve the trace\n puts tracer.trace\n\n
23
+ \ # Save the trace for ingesting to Perfetto\n File.write(\"/tmp/trace\", Cirron.to_tef(trace))\n\n\n==
24
+ Additional Information\n\nFor more detailed information, please visit the project's
25
+ GitHub page: https://github.com/s7nfo/Cirron"
56
26
  email:
57
27
  - matej.stuchlik@gmail.com
58
28
  executables: []