-
Notifications
You must be signed in to change notification settings - Fork 154
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
More features in bench/tree.exe #1269
Conversation
d661977
to
dfb190b
Compare
dfb190b
to
9a53e9c
Compare
e0018e3
to
bbba35e
Compare
bbba35e
to
43f4970
Compare
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.
Thanks, looks great! Can you share your python script too?
|> Hashtbl.of_seq | ||
|
||
(** Find and print the largest directory. This may be useful in the future to | ||
make sure that we are benching on million-sized directories. *) |
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 think we should not add code that we don't use right now. If you think it's useful you can add a cli argument to print this?
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'd have to refactor a big chunk of code to avoid printing that in the middle of the progress bar. My next PR on that file will most likely take care of it, so I'd like to keep it if that is OK for you.
Where would be a good place to put my python script? Slack? Gist? Irmin's repo? |
The python script: https://gist.github.com/Ngoguey42/872ded9908593e1dc94ab0f28e8abbe8 |
Diff 1: `--quick` is now `--mode quick`, and `--mode` gives more choices. Diff 2: The configurations for the `quick` and `slow` modes are now hard coded and can't be changed from the CLI. The other modes can be configured from the CLI. Diff 3: Add `--flatten` for trace mode to collapse the 6 step-long hashes to single steps. Diff 4: Add a progress bar using https://github.com/CraigFe/progress Diff 5: Trace mode now tracks the time spent by the 8 unitary operation, using mtime and https://github.com/barko/bentov (more info in tree.ml).
Co-authored-by: Ioana Cristescu <icristescu@users.noreply.github.com>
I keep this sort of thing in an |
1d6f2f7
to
67d8b83
Compare
Yes, we should centralise those scripts. Although I don't feel like turning this one into a notebook, I find it more convenient to manipulate image files in order to compare 2 revisions or 2 variations of a parameter. |
Notebooks can run |
Okey I can do that. I also want to be able to run from command line, which is possible for a notebook after installing some more python tools. |
My latest commit writes to disk the json histogram. If you have no more comments this PR may be merged today. |
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.
LGTM. Just style nits.
bench/irmin-pack/tree.ml
Outdated
|> Benchmark.run config | ||
in | ||
let+ () = Store.Repo.close repo in | ||
(config, result) | ||
fun fmt -> |
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 see this is already in this file in a few places, but conventionally fmt
is a format-string, and ppf
is a Format.formatter.
Co-authored-by: Craig Ferguson <me@craigfe.io>
17e89fc
to
1516b5a
Compare
… irmin-chunk, irmin-pack, irmin-test, irmin-http, irmin-unix, ppx_irmin, irmin-bench, irmin-graphql, irmin-containers, irmin-mirage-git and irmin-mirage-graphql (2.5.0) CHANGES: ### Changed - **irmin** - `Store.Tree.remove` is now much faster when operating on large directories. The commits following removals are also much faster. (mirage/irmin#1289, @Ngoguey42) - Changed `Store.Tree.{of_hash, shallow}` to take kinded hashes, allowing the creation of unforced contents values. (mirage/irmin#1285, @craigfe) - Changed `Tree.destruct` to return _lazy_ contents values, which may be forced with `Tree.Contents.force`. (mirage/irmin#1285, @craigfe) - **irmin-bench** - New features in benchmarks for tree operations (mirage/irmin#1269, @Ngoguey42)
Diff 1:
--quick
is now--mode quick
, and--mode
gives more choices.Diff 2: The configurations for the
quick
andslow
modes are now hard coded and can't be changed from the CLI. The other modes can be configured from the CLI.Diff 3: Add
--flatten
for trace mode to collapse the 6 step-long hashes to single steps.Diff 4: Add a progress bar using https://github.com/CraigFe/progress
Diff 5: Trace mode now tracks the time spent by the 8 unitary operation, using mtime and https://github.com/barko/bentov (more info in tree.ml).
I also have a python script to plot the histograms