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

use sync.Pool to retrieve bytes.Buffers #10

Merged
merged 2 commits into from
Oct 8, 2023
Merged

use sync.Pool to retrieve bytes.Buffers #10

merged 2 commits into from
Oct 8, 2023

Conversation

wazazaby
Copy link
Owner

@wazazaby wazazaby commented Oct 8, 2023

goos: darwin
goarch: arm64
pkg: github.com/wazazaby/vimebu
                                                          │   std.txt   │               pool.txt               │
                                                          │   sec/op    │   sec/op     vs base                 │
BuilderTestCases/metric_with_labels-10                      86.20n ± 1%   67.20n ± 1%   -22.03% (p=0.000 n=10)
BuilderTestCases/metric_with_single_label-10                54.06n ± 1%   48.38n ± 3%   -10.52% (p=0.000 n=10)
BuilderTestCases/metric_without_label-10                    25.23n ± 2%   34.35n ± 1%   +36.15% (p=0.000 n=10)
BuilderTestCases/no_name-10                                 2.066n ± 3%   4.625n ± 1%  +123.89% (p=0.000 n=10)
BuilderTestCases/some_empty_labels_and_values-10            62.45n ± 1%   57.93n ± 0%    -7.23% (p=0.000 n=10)
BuilderTestCases/values_contain_double_quotes-10            581.2n ± 1%   472.9n ± 0%   -18.64% (p=0.000 n=10)
BuilderTestCases/values_with_and_without_double_quotes-10   604.2n ± 2%   506.5n ± 0%   -16.18% (p=0.000 n=10)
geomean                                                     65.77n        68.62n         +4.33%

                                                          │    std.txt    │               pool.txt               │
                                                          │     B/op      │    B/op     vs base                  │
BuilderTestCases/metric_with_labels-10                      168.00 ± 0%     64.00 ± 0%  -61.90% (p=0.000 n=10)
BuilderTestCases/metric_with_single_label-10                 72.00 ± 0%     32.00 ± 0%  -55.56% (p=0.000 n=10)
BuilderTestCases/metric_without_label-10                     32.00 ± 0%     32.00 ± 0%        ~ (p=1.000 n=10) ¹
BuilderTestCases/no_name-10                                  0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
BuilderTestCases/some_empty_labels_and_values-10             72.00 ± 0%     48.00 ± 0%  -33.33% (p=0.000 n=10)
BuilderTestCases/values_contain_double_quotes-10             504.0 ± 0%     112.0 ± 0%  -77.78% (p=0.000 n=10)
BuilderTestCases/values_with_and_without_double_quotes-10    504.0 ± 0%     160.0 ± 0%  -68.25% (p=0.000 n=10)
geomean                                                                 ²               -49.86%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                                          │   std.txt    │               pool.txt               │
                                                          │  allocs/op   │ allocs/op   vs base                  │
BuilderTestCases/metric_with_labels-10                      3.000 ± 0%     1.000 ± 0%  -66.67% (p=0.000 n=10)
BuilderTestCases/metric_with_single_label-10                2.000 ± 0%     1.000 ± 0%  -50.00% (p=0.000 n=10)
BuilderTestCases/metric_without_label-10                    1.000 ± 0%     1.000 ± 0%        ~ (p=1.000 n=10) ¹
BuilderTestCases/no_name-10                                 0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
BuilderTestCases/some_empty_labels_and_values-10            2.000 ± 0%     1.000 ± 0%  -50.00% (p=0.000 n=10)
BuilderTestCases/values_contain_double_quotes-10            7.000 ± 0%     1.000 ± 0%  -85.71% (p=0.000 n=10)
BuilderTestCases/values_with_and_without_double_quotes-10   7.000 ± 0%     1.000 ± 0%  -85.71% (p=0.000 n=10)
geomean                                                                ²               -59.79%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

@wazazaby wazazaby added the enhancement New feature or request label Oct 8, 2023
@wazazaby wazazaby self-assigned this Oct 8, 2023
@wazazaby wazazaby changed the title Test/sync pool use sync.Pool to retrieve bytes.Buffers Oct 8, 2023
@wazazaby wazazaby marked this pull request as ready for review October 8, 2023 12:03
@wazazaby wazazaby merged commit aaa135b into master Oct 8, 2023
1 check passed
@wazazaby wazazaby deleted the test/sync-pool branch October 8, 2023 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant