-
Notifications
You must be signed in to change notification settings - Fork 14
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
Improve compact benchmark #106
Conversation
Marking as draft since sqlite tests are not compiling if dqlite lib is missing. |
b5a1832
to
e432c32
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.
Great work @marco6
Did a first pass - code looks good to me. However, the PR does more than what it currently says, e.g. updating the version command, adding dqlite tag fields etc.
I would ask you to either put the rationale for that in the PR description or split this into a separate one.
Agreed. I will link here all the smaller PRs I create and mark this as draft for now. |
Depends on #110 |
Depends on #111 |
61e9b51
to
6b2d0b7
Compare
Signed-off-by: Marco Manino <marco.manino@canonical.com>
Signed-off-by: Marco Manino <marco.manino@canonical.com>
Signed-off-by: Marco Manino <marco.manino@canonical.com>
Signed-off-by: Marco Manino <marco.manino@canonical.com>
Signed-off-by: Marco Manino <marco.manino@canonical.com>
6b2d0b7
to
a22ab77
Compare
All pending PR were merged. Marking as ready. |
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, great work!
This PR aims at making the
compact
benchmark a little bit better.The main problem with the current approach is that it measures insertions and deletions together with the compaction itself - and those two operations are taking the most of the time. This means that the result of the benchmark is not very representative of what compaction does.
Also, the test takes from 5 to 7 *minutes to run a single iteration which is basically most of the execution time for the benchmark themselves. Running only one iteration makes the measure unreliable and difficult to compare.
This PR attempts to solve those issues by:
b.N
so that Go can take measures accurately;It also moves the benchmark (and the test) to the
drivers
package as compaction is a backend operation (in fact, during tested logic, theclient
was used just to set up the test and as such has been removed).Last, tests under kind folder were not running. Now they are, but I had to fix the
TestMigrate
as it wasn't working. If required that can be moved to another PR before this one.