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

apmsoak: Support arbitrary headers via -header #10550

Merged
merged 2 commits into from
Mar 29, 2023

Conversation

marclop
Copy link
Contributor

@marclop marclop commented Mar 29, 2023

Motivation/summary

Adds support adding arbitrary headers to the apmsoak binary via a new header flag which can be set multiple times.

Checklist

- [ ] Update CHANGELOG.asciidoc
- [ ] Update package changelog.yml (only if changes to apmpackage have been made)
- [ ] Documentation has been updated

How to test these changes

N/A

Adds support adding arbitrary headers to the `apmsoak` binary via a new
`header` flag which can be set multiple times.

Signed-off-by: Marc Lopez Rubio <[email protected]>
@marclop marclop requested a review from a team March 29, 2023 06:49
@mergify
Copy link
Contributor

mergify bot commented Mar 29, 2023

This pull request does not have a backport label. Could you fix it @marclop? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-7.x is the label to automatically backport to the 7.x branch.
  • backport-7./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Mar 29, 2023
@apmmachine
Copy link
Contributor

apmmachine commented Mar 29, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-03-29T08:04:21.316+0000

  • Duration: 7 min 36 sec

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate and publish the docker images.

  • /test windows : Build & tests on Windows.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@apmmachine
Copy link
Contributor

apmmachine commented Mar 29, 2023

📚 Go benchmark report

Diff with the main branch

goos: linux
goarch: amd64
pkg: github.com/elastic/apm-server/internal/agentcfg
cpu: 12th Gen Intel(R) Core(TM) i5-12500
                                  │ build/main/bench.out │             bench.out              │
                                  │        sec/op        │   sec/op     vs base               │
FetchAndAdd/FetchFromCache-12                46.11n ± 0%   41.11n ± 0%  -10.85% (p=0.002 n=6)
FetchAndAdd/FetchAndAddToCache-12           104.20n ± 4%   93.72n ± 4%  -10.05% (p=0.002 n=6)
geomean                                      69.32n        62.07n       -10.45%

                                  │ build/main/bench.out │             bench.out              │
                                  │         B/op         │    B/op     vs base                │
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                  │ build/main/bench.out │             bench.out              │
                                  │      allocs/op       │ allocs/op   vs base                │
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/elastic/apm-server/internal/beater/request
                                             │ build/main/bench.out │              bench.out              │
                                             │        sec/op        │    sec/op     vs base               │
ContextResetContentEncoding/empty-12                   136.1n ±  2%   122.4n ±  1%  -10.03% (p=0.002 n=6)
ContextResetContentEncoding/uncompressed-12            164.7n ±  1%   145.1n ±  2%  -11.87% (p=0.002 n=6)
ContextResetContentEncoding/deflate-12                 3.754µ ±  4%   3.969µ ±  7%   +5.73% (p=0.026 n=6)
geomean                                                933.7n         923.5n         -1.09%

                                             │ build/main/bench.out │              bench.out               │
                                             │         B/op         │     B/op      vs base                │
geomean                                                           ²                 +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                             │ build/main/bench.out │             bench.out              │
                                             │      allocs/op       │ allocs/op   vs base                │
geomean                                                           ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/elastic/apm-server/internal/publish
             │ build/main/bench.out │            bench.out             │
             │        sec/op        │   sec/op    vs base              │
Publisher-12             1.003 ± 0%   1.004 ± 0%  +0.08% (p=0.004 n=6)

             │ build/main/bench.out │           bench.out            │
             │         B/op         │     B/op       vs base         │

             │ build/main/bench.out │           bench.out           │
             │      allocs/op       │  allocs/op    vs base         │

pkg: github.com/elastic/apm-server/x-pack/apm-server/aggregation/spanmetrics
                 │ build/main/bench.out │          bench.out           │
                 │        sec/op        │   sec/op     vs base         │

                 │ build/main/bench.out │            bench.out            │
                 │         B/op         │     B/op      vs base           │
¹ all samples are equal

                 │ build/main/bench.out │           bench.out           │
                 │      allocs/op       │ allocs/op   vs base           │
¹ all samples are equal

pkg: github.com/elastic/apm-server/x-pack/apm-server/aggregation/txmetrics
                        │ build/main/bench.out │          bench.out           │
                        │        sec/op        │   sec/op     vs base         │

                        │ build/main/bench.out │           bench.out           │
                        │         B/op         │    B/op     vs base           │
¹ all samples are equal

                        │ build/main/bench.out │           bench.out           │
                        │      allocs/op       │ allocs/op   vs base           │
¹ all samples are equal

pkg: github.com/elastic/apm-server/x-pack/apm-server/sampling
               │ build/main/bench.out │             bench.out              │
               │        sec/op        │    sec/op     vs base              │
geomean                  622.3n         569.8n        -8.44%

               │ build/main/bench.out │              bench.out               │
               │         B/op         │     B/op      vs base                │
Process-12             9.263Ki ± 3%     9.151Ki ± 1%  -1.20% (p=0.037 n=6)
geomean                             ²                 -0.60%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

               │ build/main/bench.out │             bench.out              │
               │      allocs/op       │ allocs/op   vs base                │
geomean                             ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/elastic/apm-server/x-pack/apm-server/sampling/eventstorage
                                            │ build/main/bench.out │               bench.out               │
                                            │        sec/op        │     sec/op      vs base               │
ShardedWriteTransactionContended-12                   5.674µ ± 22%    9.470µ ±  42%  +66.92% (p=0.026 n=6)
WriteTransaction/json_codec-12                        9.386µ ± 79%    4.015µ ±  11%  -57.22% (p=0.002 n=6)
WriteTransaction/json_codec_big_tx-12                15.256µ ± 36%    4.890µ ±   4%  -67.95% (p=0.002 n=6)
ReadEvents/json_codec/0_events-12                     350.3n ±  8%    306.8n ±   4%  -12.41% (p=0.002 n=6)
ReadEvents/json_codec/1_events-12                     11.37µ ±  7%    10.78µ ±   4%   -5.17% (p=0.041 n=6)
ReadEvents/json_codec_big_tx/0_events-12              355.5n ±  8%    302.6n ±  13%  -14.87% (p=0.009 n=6)
ReadEvents/json_codec_big_tx/1_events-12              12.39µ ±  4%    11.49µ ±   4%   -7.26% (p=0.002 n=6)
ReadEvents/nop_codec/0_events-12                      350.9n ±  7%    310.2n ±   7%  -11.60% (p=0.004 n=6)
ReadEvents/nop_codec/10_events-12                     19.19µ ± 37%    30.59µ ±  18%  +59.35% (p=0.009 n=6)
ReadEvents/nop_codec_big_tx/0_events-12               343.4n ±  6%    304.2n ±  13%  -11.42% (p=0.015 n=6)
IsTraceSampled/sampled-12                             78.62n ±  3%    69.13n ±   2%  -12.07% (p=0.002 n=6)
IsTraceSampled/unsampled-12                           77.98n ±  1%    71.18n ±   7%   -8.71% (p=0.002 n=6)
IsTraceSampled/unknown-12                             416.8n ±  2%    378.4n ±   5%   -9.24% (p=0.002 n=6)
geomean                                               31.35µ          30.11µ          -3.95%

                                            │ build/main/bench.out │               bench.out                │
                                            │         B/op         │      B/op       vs base                │
WriteTransaction/json_codec_big_tx-12                3.688Ki ±  0%    3.686Ki ±  0%  -0.04% (p=0.022 n=6)
geomean                                              31.39Ki          31.55Ki        +0.52%
¹ all samples are equal

                                            │ build/main/bench.out │              bench.out              │
                                            │      allocs/op       │  allocs/op   vs base                │
geomean                                                 144.7         144.7       +0.00%
¹ all samples are equal

report generated with https://pkg.go.dev/golang.org/x/perf/cmd/benchstat

Signed-off-by: Marc Lopez Rubio <[email protected]>
@marclop marclop merged commit 4c1e156 into elastic:main Mar 29, 2023
@marclop marclop deleted the f/support-arbitrary-headers branch March 29, 2023 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants