-
Notifications
You must be signed in to change notification settings - Fork 7
Fix micro benchmarks #538
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
Fix micro benchmarks #538
Conversation
Related: #440 |
The minimum length of keys for the compact index increased from 6 to 8 bytes at some point. Also, releasing a run was changed to remove the files associated with it. The cleanup code was manually doing the same, which then became unnecessary and started causing issues. Merge micro bench: release run during cleanup only
This previously tried creating the wbblobs file with an empty path, so there was an existing directory (the benchmark's root directory) already where the file was supposed to go.
With recent changes related to WriteBufferBlobs, flushing a write buffer started copying its blobs to a new file. This made the setup fail, since it generated random blob references, but no actual blobs they point at.
This fixes the file paths errors for the write buffer blobs. It is also generally the right direction to go: If we ever want these tests to work with a write buffer and blobs, lookups must look at the original write buffer blobs, not an empty one.
eb7d34d
to
a7114d1
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.
LGTM
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.
Very nice!
-- We make sure to immediately close resulting runs so we don't run | ||
-- out of file handles or disk space. However, we don't want it to | ||
-- be part of the measurement, as it includes deleting files. | ||
-- Therefore, ... TODO |
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.
There is a dangling TODO here
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.
Oops, that slipped through. Thanks for pointing it out. #547
randomEntry g = frequency [ | ||
(20, \g' -> let (!v, !g'') = uniform g' in (Insert v, g'')) | ||
, (1, \g' -> let (!v, !g'') = uniform g' | ||
(!b, !g''') = genBlobSpan g'' | ||
(!b, !g''') = randomByteStringR (0, 2000) g'' -- < 2kB |
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.
You can generate much smaller blobs. It would speed up the benchmark setup, and the performance of the lookups code does not depend on the blob size. But it's maybe also not super important because inserts with blobs are generated only rarely
Quick follow-up to address feedback for #538
Some micro benchmarks don't run any more. I fixed two where the benchmark environment code got broken by recent changes.
Fixes #440. (this was one of them)