cirron 0.2.2 → 0.2.4

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 +31 -26
  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: ff54dda8d0986886acb138298e91096d18acfd9cdb0adb927b13613d6f0eca17
4
- data.tar.gz: 7fd5cb27f2834094f1d3941d1c24aca63a4195835f98fc133d064664db4ec662
3
+ metadata.gz: 3f722ffc04b1680939ef3bcbfbd94ed787a3f43a0c439bb6b308b088ecdb0795
4
+ data.tar.gz: 95ab67e0ecc02b80b355536fca9d6fef3fdc1c6e4d236e0bb1ab7c419cf7bf65
5
5
  SHA512:
6
- metadata.gz: 0af236106e911b520dea0dab38194652c1e3ef3f5ccfa33f46f261dd17a8807a15501f136f0a02cc9aa22ab3c09ae7f44088aa41c2451d09fdcda0b288ceab8d
7
- data.tar.gz: adfaa9a35e9c2d107c675a9beadfc72c65612d02fcb57d7bc76103b4f050872b06c9e3b73edd43745f5c392a607c182ae08d4075e4ea092bbcc16d02abbaaf7a
6
+ metadata.gz: d39a9e5c38ac51db99711cadf506761274b1013085e24ca64c2f1dff8eccb261bc66f6fb7eae8a8bb452904df130877fc8b3f73e5e7f221e8f4e6b9c95581e79
7
+ data.tar.gz: 10f6f669dc6fc5be2937d3a0d02f365bbb51bef2cee037ff76e977f4ca767a1f3ef4e7017c71a8b5d813dd61b16c98a59377ba8c57e4ea566d512a06adba60f4
data/README.md CHANGED
@@ -1,42 +1,47 @@
1
- ==
2
- # Cirron
1
+ == 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
+ It can also trace syscalls using +strace+, Linux only!
7
8
 
8
- ## Prerequisites
9
+ == Prerequisites
9
10
 
10
- - Linux with perf events support / Apple ARM OSX
11
- - C++
12
- - Ruby 3.x
11
+ * Linux with perf events support / Apple ARM OSX
12
+ * C++
13
+ * Ruby 3.x
13
14
 
14
- ## Usage
15
+ == Usage
15
16
 
16
- ### Performance Counters
17
- ```
18
- from cirron import Collector
17
+ === Performance Counters
19
18
 
20
- # Start collecting performance metrics
21
- with Collector() as collector:
19
+ require 'cirron'
20
+
21
+ # Start collecting performance metrics
22
+ Cirron::Collector.new do |collector|
22
23
  # Your code here
23
24
  # ...
25
+ end
26
+
27
+ # Retrieve the metrics
28
+ puts collector.counters
24
29
 
25
- # Retrieve the metrics
26
- print(collector.counters)
27
- ```
30
+ === Syscalls
28
31
 
29
- ### Syscalls
30
- ```
31
- from cirron import Tracer, to_tef
32
+ require 'cirron'
32
33
 
33
- with Tracer() as tracer:
34
+ Cirron::Tracer.new do |tracer|
34
35
  # Your code here
35
36
  # ...
37
+ end
38
+
39
+ # Stop collecting and retrieve the trace
40
+ puts tracer.trace
41
+
42
+ # Save the trace for ingesting to Perfetto
43
+ File.write("/tmp/trace", Cirron.to_tef(trace))
36
44
 
37
- # Stop collecting and retrieve the trace
38
- print(tracer.trace)
45
+ == Additional Information
39
46
 
40
- # Save the trace for ingesting to Perfetto
41
- open("/tmp/trace", "w").write(to_tef(trace))
42
- ```
47
+ 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.2"
9
+ spec.version = "0.2.4"
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.2
4
+ version: 0.2.4
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
- ==
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\nIt can also trace syscalls using +strace+, Linux only!\n\n== Prerequisites\n\n*
17
+ Linux with perf events support / Apple ARM OSX\n* C++\n* Ruby 3.x\n\n== Usage\n\n===
18
+ Performance Counters\n\n require 'cirron'\n\n # Start collecting performance metrics\n
19
+ \ Cirron::Collector.new do |collector|\n # Your code here\n # ...\n end\n\n
20
+ \ # Retrieve the metrics\n puts collector.counters\n\n=== Syscalls\n\n require
21
+ 'cirron'\n\n Cirron::Tracer.new do |tracer|\n # Your code here\n # ...\n
22
+ \ 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==
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: []