-
Notifications
You must be signed in to change notification settings - Fork 157
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
WIP: irmin-pack.unix: Measure IO activity. #2250
base: main
Are you sure you want to change the base?
Conversation
06bab22
to
530ed0e
Compare
@@ -168,7 +169,6 @@ module Unix = struct | |||
usage is safe. *) | |||
let buf = Bytes.unsafe_of_string s in | |||
let () = Util.really_write t.fd off buf 0 len in | |||
Index.Stats.add_write len; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just remembered that the stats here are used as a quick and dirty way to aggregate IO activity for the benchmark summary.
We need to double check the "official" summary printer but you can see how it is used for the bench/irmin-pack
tree replay.
irmin/bench/irmin-pack/trace_stat_summary_pp.ml
Lines 384 to 390 in 1f046dd
pb ~f:(`RM, `RM) "Disk bytes read" (fun s -> s.index.bytes_read); | |
pb ~f:(`RM, `RM) "Disk bytes written" (fun s -> s.index.bytes_written); | |
pb ~f:(`RM, `RM) "Disk bytes both" (fun s -> s.index.bytes_both); | |
`Spacer; | |
pb "Disk reads" (fun s -> s.index.nb_reads); | |
pb "Disk writes" (fun s -> s.index.nb_writes); | |
pb "Disk both" (fun s -> s.index.nb_both); |
I am definitely in favor of cleaning this up and making it more clear that these are not "index" stats. Perhaps your new Io stats can help the summary aggregate the index activity as well.
This seems to be remnant from before `index` was split into its own repository.
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #2250 +/- ##
==========================================
- Coverage 68.15% 68.09% -0.07%
==========================================
Files 137 137
Lines 16669 16692 +23
==========================================
+ Hits 11361 11366 +5
- Misses 5308 5326 +18
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This adds counters that meassure i/o activity at file level.