Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e4f46cc
feat(binary_trace_format_v1): update runtime_tracing to version 0.14.0
nickysn Jul 30, 2025
a752ea5
feat(binary_trace_format_v1): update Cargo.lock after previous commit
nickysn Jul 30, 2025
9d242af
feat(binary_trace_format_v1): compilation fixes, and adaptations for …
nickysn Jul 30, 2025
2753576
feat(binary_trace_format_v1): introduced an initialize() method, that…
nickysn Jul 30, 2025
78e5f5b
feat(binary_trace_format_v1): update Ruby code to take path and forma…
nickysn Aug 1, 2025
6abbd98
feat(binary_trace_format_v1): changed the flush_trace method to not t…
nickysn Aug 1, 2025
fa9c5c9
feat(binary_trace_format_v1): fix tests after previous commit
nickysn Aug 1, 2025
443f5b7
chore:update flake.lock
nickysn Aug 1, 2025
791b796
chore: cargo fmt
nickysn Aug 1, 2025
0bbcc9c
feat(binary_trace_format_v1): update the pure ruby recorder's interfa…
nickysn Aug 1, 2025
48f5f83
feat(binary_trace_format_v1): update the readme, to reflect the new i…
nickysn Aug 1, 2025
c56fa02
feat(binary_trace_format_v1): also support the version 0 binary forma…
nickysn Aug 1, 2025
b4745bd
refactor: simplify code
nickysn Aug 1, 2025
eea0584
refactor: removed unreachable code
nickysn Aug 1, 2025
3db0282
refactor: use TraceWriter::register_special_event in record_event, in…
nickysn Aug 1, 2025
9d5d4c6
refactor: use TraceWriter::register_special_event in record_event, in…
nickysn Aug 1, 2025
b7bb4b0
refactor: use TraceWriter::register_return instead of doing it manual…
nickysn Aug 1, 2025
4e6aac7
refactor: removed unused commented out code
nickysn Aug 4, 2025
02182b2
chore: cargo fmt
nickysn Aug 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ After installing, load the tracer:
require 'codetracer_ruby_recorder' # native implementation
# require 'codetracer_pure_ruby_recorder' # pure Ruby implementation

recorder = RubyRecorder.new
recorder = RubyRecorder.new(Dir.pwd)
recorder.enable_tracing
# ... your code ...
recorder.flush_trace(Dir.pwd)
recorder.flush_trace
```

### Usage
Expand Down
76 changes: 75 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def self.parse_argv_and_trace_ruby_file(argv)
end

def self.trace_ruby_file(program, out_dir, program_args = [])
tracer = PureRubyRecorder.new(debug: ENV['CODETRACER_RUBY_RECORDER_DEBUG'] == '1')
tracer = PureRubyRecorder.new(out_dir, debug: ENV['CODETRACER_RUBY_RECORDER_DEBUG'] == '1')

tracer.record.register_call('', 1, '<top-level>', [])
tracer.ignore('lib/ruby')
Expand Down Expand Up @@ -81,10 +81,11 @@ def self.trace_ruby_file(program, out_dir, program_args = [])
0
end

def initialize(debug: false)
def initialize(out_dir, debug: false)
@tracing = false
@record = TraceRecord.new
@ignore_list = []
@out_dir = out_dir
@debug = debug
@record.debug = debug if @record.respond_to?(:debug=)
setup_tracepoints
Expand Down Expand Up @@ -243,8 +244,8 @@ def trace_block(&block)
end

# Flush trace to output directory - compatible with native recorder API
def flush_trace(out_dir)
@record.serialize('', out_dir)
def flush_trace
@record.serialize('', @out_dir)
end

private
Expand Down
122 changes: 120 additions & 2 deletions gems/codetracer-ruby-recorder/ext/native_tracer/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gems/codetracer-ruby-recorder/ext/native_tracer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]

[dependencies]
rb-sys = "0.9"
runtime_tracing = "0.12.1"
runtime_tracing = "0.14.0"

[build-dependencies]
rb-sys-env = "0.2"
Expand Down
Loading
Loading