Skip to content

Conversation

mattsse
Copy link
Contributor

@mattsse mattsse commented Jul 10, 2025

Summary

Adds comprehensive benchmarks for js-tracer performance testing to help measure and optimize performance.

Changes

  • Added Criterion benchmarks for various js-tracer scenarios:
    • Simple step counter
    • Database access operations
    • Heavy operations (collecting multiple fields)
    • Memory operations
    • Stack operations
    • Enter/exit frame tracking
  • Added profiling binary for generating flamegraphs

Usage

# Run benchmarks
cargo bench --bench js_tracer --features js-tracer

# Generate flamegraph (requires cargo-flamegraph or samply)
cargo build --bench js_tracer_profile --features js-tracer --release
samply record target/release/deps/js_tracer_profile-*

These benchmarks will help measure the performance impact of future optimizations to the js-tracer, particularly around object reuse.

🤖 Generated with Claude Code

Adds comprehensive benchmarks for js-tracer performance testing:
- Simple step counter
- Database access operations
- Heavy operations (collecting multiple fields)
- Memory operations
- Stack operations
- Enter/exit frame tracking

Also includes a profiling binary for generating flamegraphs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@mattsse mattsse requested a review from DaniPopes as a code owner July 10, 2025 12:50
mattsse and others added 3 commits July 10, 2025 14:52
Add #![allow(missing_docs)] to both benchmark files to suppress documentation warnings.
Add #![allow(dead_code)] to js_tracer_profile.rs for unused profile functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants