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 continuous benchmarking #123

Merged
merged 5 commits into from
Jul 11, 2024
Merged

Add continuous benchmarking #123

merged 5 commits into from
Jul 11, 2024

Conversation

marco6
Copy link
Collaborator

@marco6 marco6 commented Jul 9, 2024

This PR gather results from the benchmarking job and compares them with the base branch, so that we can monitor how a change affects performance.

It mostly uses standard tooling, so the output is still a bit rough, but I think it's for the best as it's the same format one would read while running benchmarks on his own machine.

It is a duplicate of #122 but it comes from the repo itself, so it should have the right permission.

@marco6 marco6 requested a review from a team as a code owner July 9, 2024 15:10
Copy link

github-actions bot commented Jul 9, 2024

Benchmark Result

goos: linux
goarch: amd64
pkg: github.com/canonical/k8s-dqlite/pkg/kine/drivers
cpu: AMD EPYC 7763 64-Core Processor                
                   │   Before    │               After               │
                   │   sec/op    │   sec/op     vs base              │
DqliteCompaction-4   4.677m ± 8%   4.840m ± 7%       ~ (p=0.073 n=7)
SQLiteCompaction-4   3.080m ± 3%   3.214m ± 4%  +4.33% (p=0.026 n=7)
geomean              3.796m        3.944m       +3.91%

                   │    Before    │               After                │
                   │     B/op     │     B/op      vs base              │
DqliteCompaction-4   39.69Ki ± 2%   39.64Ki ± 3%       ~ (p=0.805 n=7)
SQLiteCompaction-4   60.09Ki ± 1%   60.33Ki ± 1%       ~ (p=0.259 n=7)
geomean              48.83Ki        48.90Ki       +0.14%

                   │   Before    │               After               │
                   │  allocs/op  │  allocs/op   vs base              │
DqliteCompaction-4   1.225k ± 1%   1.223k ± 3%       ~ (p=0.774 n=7)
SQLiteCompaction-4   2.901k ± 1%   2.914k ± 1%       ~ (p=0.244 n=7)
geomean              1.885k        1.888k       +0.14%

pkg: github.com/canonical/k8s-dqlite/test
                │   Before    │               After               │
                │   sec/op    │   sec/op     vs base              │
Create/sqlite-4   1.283m ± 3%   1.310m ± 5%       ~ (p=0.165 n=7)
Create/dqlite-4   1.325m ± 4%   1.315m ± 4%       ~ (p=0.535 n=7)
Delete/sqlite-4   1.301m ± 8%   1.319m ± 4%       ~ (p=0.456 n=7)
Delete/dqlite-4   1.379m ± 7%   1.417m ± 6%       ~ (p=0.902 n=7)
Get/sqlite-4      360.1µ ± 1%   357.8µ ± 0%       ~ (p=0.165 n=7)
Get/dqlite-4      481.2µ ± 1%   478.0µ ± 1%  -0.68% (p=0.026 n=7)
Lease/sqlite-4    104.4µ ± 2%   101.2µ ± 4%  -3.01% (p=0.007 n=7)
Lease/dqlite-4    107.2µ ± 2%   103.5µ ± 1%  -3.44% (p=0.001 n=7)
List/sqlite-4     7.222m ± 5%   7.262m ± 4%       ~ (p=0.383 n=7)
List/dqlite-4     44.00m ± 0%   44.01m ± 0%       ~ (p=0.209 n=7)
Update/sqlite-4   1.326m ± 5%   1.343m ± 4%       ~ (p=0.383 n=7)
Update/dqlite-4   1.350m ± 6%   1.353m ± 4%       ~ (p=0.456 n=7)
geomean           1.106m        1.106m       -0.04%

                │    Before    │               After                │
                │     B/op     │     B/op      vs base              │
Create/sqlite-4   21.05Ki ± 0%   21.05Ki ± 0%       ~ (p=0.971 n=7)
Create/dqlite-4   18.75Ki ± 0%   18.75Ki ± 0%       ~ (p=0.513 n=7)
Delete/sqlite-4   22.98Ki ± 0%   22.99Ki ± 0%  +0.03% (p=0.019 n=7)
Delete/dqlite-4   20.03Ki ± 0%   20.03Ki ± 0%       ~ (p=0.735 n=7)
Get/sqlite-4      16.67Ki ± 0%   16.67Ki ± 0%       ~ (p=0.972 n=7)
Get/dqlite-4      15.35Ki ± 0%   15.35Ki ± 0%       ~ (p=1.000 n=7)
Lease/sqlite-4    12.33Ki ± 0%   12.33Ki ± 0%       ~ (p=0.217 n=7)
Lease/dqlite-4    12.33Ki ± 0%   12.33Ki ± 0%       ~ (p=0.559 n=7)
List/sqlite-4     1.105Mi ± 5%   1.111Mi ± 6%       ~ (p=0.456 n=7)
List/dqlite-4     76.13Ki ± 0%   76.10Ki ± 0%       ~ (p=0.091 n=7)
Update/sqlite-4   23.03Ki ± 0%   23.04Ki ± 0%       ~ (p=0.202 n=7)
Update/dqlite-4   20.01Ki ± 0%   20.01Ki ± 0%       ~ (p=0.197 n=7)
geomean           28.44Ki        28.46Ki       +0.05%

                │   Before    │                After                │
                │  allocs/op  │  allocs/op   vs base                │
Create/sqlite-4    501.0 ± 0%    501.0 ± 0%       ~ (p=1.000 n=7)
Create/dqlite-4    366.0 ± 0%    366.0 ± 0%       ~ (p=1.000 n=7)
Delete/sqlite-4    571.0 ± 0%    571.0 ± 0%       ~ (p=1.000 n=7) ¹
Delete/dqlite-4    383.0 ± 0%    383.0 ± 0%       ~ (p=1.000 n=7)
Get/sqlite-4       386.0 ± 0%    386.0 ± 0%       ~ (p=1.000 n=7) ¹
Get/dqlite-4       291.0 ± 0%    291.0 ± 0%       ~ (p=1.000 n=7) ¹
Lease/sqlite-4     224.0 ± 0%    224.0 ± 0%       ~ (p=1.000 n=7) ¹
Lease/dqlite-4     224.0 ± 0%    224.0 ± 0%       ~ (p=1.000 n=7) ¹
List/sqlite-4     45.33k ± 5%   45.63k ± 4%       ~ (p=0.456 n=7)
List/dqlite-4     1.723k ± 0%   1.723k ± 0%       ~ (p=1.000 n=7) ¹
Update/sqlite-4    579.0 ± 1%    580.0 ± 0%       ~ (p=0.070 n=7)
Update/dqlite-4    388.0 ± 0%    388.0 ± 0%       ~ (p=1.000 n=7) ¹
geomean            630.8         631.2       +0.07%
¹ all samples are equal
Current status
goos: linux
goarch: amd64
pkg: github.com/canonical/k8s-dqlite/pkg/kine/drivers
cpu: AMD EPYC 7763 64-Core Processor                
                   │    After    │
                   │   sec/op    │
DqliteCompaction-4   4.840m ± 7%
SQLiteCompaction-4   3.214m ± 4%
geomean              3.944m

                   │    After     │
                   │     B/op     │
DqliteCompaction-4   39.64Ki ± 3%
SQLiteCompaction-4   60.33Ki ± 1%
geomean              48.90Ki

                   │    After    │
                   │  allocs/op  │
DqliteCompaction-4   1.223k ± 3%
SQLiteCompaction-4   2.914k ± 1%
geomean              1.888k

pkg: github.com/canonical/k8s-dqlite/test
                │    After    │
                │   sec/op    │
Create/sqlite-4   1.310m ± 5%
Create/dqlite-4   1.315m ± 4%
Delete/sqlite-4   1.319m ± 4%
Delete/dqlite-4   1.417m ± 6%
Get/sqlite-4      357.8µ ± 0%
Get/dqlite-4      478.0µ ± 1%
Lease/sqlite-4    101.2µ ± 4%
Lease/dqlite-4    103.5µ ± 1%
List/sqlite-4     7.262m ± 4%
List/dqlite-4     44.01m ± 0%
Update/sqlite-4   1.343m ± 4%
Update/dqlite-4   1.353m ± 4%
geomean           1.106m

                │    After     │
                │     B/op     │
Create/sqlite-4   21.05Ki ± 0%
Create/dqlite-4   18.75Ki ± 0%
Delete/sqlite-4   22.99Ki ± 0%
Delete/dqlite-4   20.03Ki ± 0%
Get/sqlite-4      16.67Ki ± 0%
Get/dqlite-4      15.35Ki ± 0%
Lease/sqlite-4    12.33Ki ± 0%
Lease/dqlite-4    12.33Ki ± 0%
List/sqlite-4     1.111Mi ± 6%
List/dqlite-4     76.10Ki ± 0%
Update/sqlite-4   23.04Ki ± 0%
Update/dqlite-4   20.01Ki ± 0%
geomean           28.46Ki

                │    After    │
                │  allocs/op  │
Create/sqlite-4    501.0 ± 0%
Create/dqlite-4    366.0 ± 0%
Delete/sqlite-4    571.0 ± 0%
Delete/dqlite-4    383.0 ± 0%
Get/sqlite-4       386.0 ± 0%
Get/dqlite-4       291.0 ± 0%
Lease/sqlite-4     224.0 ± 0%
Lease/dqlite-4     224.0 ± 0%
List/sqlite-4     45.63k ± 4%
List/dqlite-4     1.723k ± 0%
Update/sqlite-4    580.0 ± 0%
Update/dqlite-4    388.0 ± 0%
geomean            631.2

@marco6 marco6 requested a review from bschimke95 July 9, 2024 15:23
Copy link
Contributor

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marco6 marco6 merged commit 253134d into master Jul 11, 2024
13 of 14 checks passed
@marco6 marco6 deleted the marco6/continuous-benchmarking branch July 11, 2024 08:25
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