Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tracing to saffron #2961

Merged
merged 1 commit into from
Jan 23, 2025
Merged

add tracing to saffron #2961

merged 1 commit into from
Jan 23, 2025

Conversation

martyall
Copy link
Contributor

@martyall martyall commented Jan 22, 2025

I'm adding the tracing library in order to uniformly handle the combo of instrumenting and logging like you find here

Here is an example output from running a test locally:

2025-01-22T19:32:19.946Z DEBUG saffron: Encoding file input_file="/home/martyall/tmp/bigfile.txt"
2025-01-22T19:32:20.925Z  INFO encode: saffron::serialization: close time.busy=829ms time.idle=5.01µs
2025-01-22T19:32:21.089Z DEBUG saffron: Writing encoded blob to file output_file="/home/martyall/tmp/bigfile.bin"

2025-01-22T19:32:21.543Z DEBUG saffron: Decoding file input_file="/home/martyall/tmp/bigfile.bin"
2025-01-22T19:32:23.293Z  INFO decode: saffron::serialization: close time.busy=1.35s time.idle=4.30µs
2025-01-22T19:32:23.293Z DEBUG saffron: Writing decoded blob to file output_file="/home/martyall/tmp/bigfile-decodedtxt"

This is what it actually looks like. This was useful in optimizing the decode function in #2959 . There were many times I wish I had this when working on o1vm -- specifically the ability to have nested spans to help locate problems rather than manually tracing debug statements

@martyall martyall marked this pull request as ready for review January 22, 2025 19:38
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 8.33333% with 22 lines in your changes missing coverage. Please review.

Project coverage is 76.79%. Comparing base (228e998) to head (70732bc).
Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
saffron/src/main.rs 0.00% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2961      +/-   ##
==========================================
+ Coverage   76.53%   76.79%   +0.26%     
==========================================
  Files         258      258              
  Lines       61160    61166       +6     
==========================================
+ Hits        46807    46971     +164     
+ Misses      14353    14195     -158     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martyall martyall merged commit a316a32 into master Jan 23, 2025
13 checks passed
@martyall martyall deleted the martin/add-tracing-to-saffron branch January 23, 2025 00:27
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