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

fix(backend): reduce allocations in fingerprint code #5354

Merged
merged 1 commit into from
Jul 28, 2023
Merged

Conversation

prymitive
Copy link
Owner

No description provided.

@github-actions
Copy link

Go benchmark diff

name                               old time/op        new time/op        delta
pkg:github.com/prymitive/karma/cmd/karma goos:linux goarch:amd64
Compress/Run-2                           4.96ms ± 2%        4.85ms ± 3%   -2.14%  (p=0.006 n=9+10)
Decompress/Run-2                         8.35ms ± 2%        8.40ms ± 2%     ~     (p=0.356 n=9+10)
CompressionAndDecompression/Run-2        11.5ms ± 3%        11.6ms ± 2%     ~     (p=0.063 n=10+10)
PullAlerts/0.22.0-2                      4.63ms ± 1%        3.73ms ± 3%  -19.46%  (p=0.000 n=8+10)
AlertsAPIMisses/0.22.0-2                 2.18ms ± 5%        1.39ms ± 4%  -36.36%  (p=0.000 n=10+10)
AlertsAPIMissesAutoGrid/0.22.0-2         2.26ms ± 3%        1.43ms ± 4%  -36.90%  (p=0.000 n=10+9)
AlertsAPIHits/0.22.0-2                    938µs ± 1%         937µs ± 2%     ~     (p=0.905 n=9+10)
pkg:github.com/prymitive/karma/internal/alertmanager goos:linux goarch:amd64
DedupAlerts/Run-2                         195µs ± 6%         184µs ± 2%   -5.88%  (p=0.000 n=9+9)
DedupAutocomplete/Run-2                  75.9µs ± 1%        77.5µs ± 3%   +2.08%  (p=0.001 n=9+10)
DedupColors/Run-2                        19.6µs ± 2%        19.4µs ± 1%   -0.94%  (p=0.029 n=10+10)
pkg:github.com/prymitive/karma/internal/filters goos:linux goarch:amd64
Autocomplete-2                            183ms ± 2%         184ms ± 5%     ~     (p=0.912 n=10+10)

name                               old %/compression  new %/compression  delta
pkg:github.com/prymitive/karma/cmd/karma goos:linux goarch:amd64
Compress/Run-2                             0.04 ± 0%          0.04 ± 0%     ~     (all equal)

name                               old alloc/op       new alloc/op       delta
pkg:github.com/prymitive/karma/cmd/karma goos:linux goarch:amd64
Compress/Run-2                           1.47MB ± 0%        1.47MB ± 0%     ~     (p=0.868 n=10+10)
Decompress/Run-2                         10.6MB ± 0%        10.6MB ± 0%     ~     (all equal)
CompressionAndDecompression/Run-2        12.1MB ± 0%        12.1MB ± 0%   -0.00%  (p=0.033 n=10+10)
PullAlerts/0.22.0-2                      1.30MB ± 0%        0.92MB ± 0%  -29.48%  (p=0.000 n=10+9)
AlertsAPIMisses/0.22.0-2                 1.70MB ± 0%        1.47MB ± 0%  -13.57%  (p=0.000 n=9+10)
AlertsAPIMissesAutoGrid/0.22.0-2         1.72MB ± 0%        1.47MB ± 0%  -14.29%  (p=0.000 n=10+10)
AlertsAPIHits/0.22.0-2                    293kB ± 0%         291kB ± 0%   -0.61%  (p=0.000 n=10+9)
pkg:github.com/prymitive/karma/internal/alertmanager goos:linux goarch:amd64
DedupAlerts/Run-2                         164kB ± 0%         162kB ± 0%   -1.34%  (p=0.000 n=10+10)
DedupAutocomplete/Run-2                  44.0kB ± 0%        44.0kB ± 0%     ~     (p=0.511 n=10+10)
DedupColors/Run-2                        11.0kB ± 0%        11.0kB ± 0%     ~     (all equal)
pkg:github.com/prymitive/karma/internal/filters goos:linux goarch:amd64
Autocomplete-2                           71.8MB ± 0%        71.8MB ± 0%     ~     (p=0.497 n=10+9)

name                               old allocs/op      new allocs/op      delta
pkg:github.com/prymitive/karma/cmd/karma goos:linux goarch:amd64
Compress/Run-2                             28.5 ± 2%          28.5 ± 2%     ~     (p=1.000 n=10+10)
Decompress/Run-2                            107 ± 0%           107 ± 0%     ~     (all equal)
CompressionAndDecompression/Run-2           138 ± 0%           138 ± 0%     ~     (p=0.087 n=10+10)
PullAlerts/0.22.0-2                       23.6k ± 0%         16.7k ± 0%  -29.04%  (p=0.001 n=8+9)
AlertsAPIMisses/0.22.0-2                  7.10k ± 0%         3.01k ± 0%  -57.66%  (p=0.000 n=10+10)
AlertsAPIMissesAutoGrid/0.22.0-2          6.96k ± 0%         2.87k ± 0%  -58.86%  (p=0.000 n=10+10)
AlertsAPIHits/0.22.0-2                    2.28k ± 0%         2.27k ± 0%   -0.31%  (p=0.000 n=10+10)
pkg:github.com/prymitive/karma/internal/alertmanager goos:linux goarch:amd64
DedupAlerts/Run-2                           909 ± 0%           875 ± 0%   -3.74%  (p=0.000 n=10+10)
DedupAutocomplete/Run-2                     136 ± 0%           136 ± 0%     ~     (all equal)
DedupColors/Run-2                          51.0 ± 0%          51.0 ± 0%     ~     (all equal)
pkg:github.com/prymitive/karma/internal/filters goos:linux goarch:amd64
Autocomplete-2                            1.60M ± 0%         1.60M ± 0%     ~     (p=0.562 n=10+9)

@prymitive prymitive merged commit 2443d09 into main Jul 28, 2023
21 of 23 checks passed
@prymitive prymitive deleted the xxhash branch July 28, 2023 10:55
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant