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: invert args order for prefix check in deprecation notice #10329

Merged
merged 2 commits into from
Feb 22, 2023

Conversation

kruskall
Copy link
Member

Motivation/summary

Recalling the exact syntax for the built-in stab() function, you make a sane assumption and call shoot(GUN, FOOT); The foot shoots your gun

Checklist

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

Related issues

@mergify
Copy link
Contributor

mergify bot commented Feb 22, 2023

This pull request does not have a backport label. Could you fix it @kruskall? 🙏
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 Feb 22, 2023
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

oops :) sorry, I clearly didn't do a good review either!

@apmmachine
Copy link
Contributor

apmmachine commented Feb 22, 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-02-22T03:11:31.154+0000

  • Duration: 8 min 10 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!)

@kruskall kruskall enabled auto-merge (squash) February 22, 2023 03:16
@apmmachine
Copy link
Contributor

📚 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               42.68n ± ∞ ¹    46.15n ± ∞ ¹  +8.13% (p=0.008 n=5)
FetchAndAdd/FetchAndAddToCache-12           96.12n ± ∞ ¹   102.60n ± ∞ ¹  +6.74% (p=0.008 n=5)
geomean                                     64.05n          68.81n        +7.43%
¹ need >= 6 samples for confidence interval at level 0.95

                                  │ build/main/bench.out │              bench.out              │
                                  │         B/op         │    B/op      vs base                │
geomean                                                ³                +0.00%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² 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%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² 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                   121.8n ± ∞ ¹   135.9n ± ∞ ¹  +11.58% (p=0.008 n=5)
ContextResetContentEncoding/uncompressed-12            146.6n ± ∞ ¹   161.5n ± ∞ ¹  +10.16% (p=0.008 n=5)
ContextResetContentEncoding/deflate-12                 2.073µ ± ∞ ¹   3.916µ ± ∞ ¹  +88.90% (p=0.016 n=5)
geomean                                                788.8n         905.7n        +14.82%
¹ need >= 6 samples for confidence interval at level 0.95

                                             │ build/main/bench.out │               bench.out               │
                                             │         B/op         │     B/op       vs base                │
geomean                                                           ³                  +0.00%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² 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%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² 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         │
¹ need >= 6 samples for confidence interval at level 0.95

             │ build/main/bench.out │           bench.out            │
             │         B/op         │     B/op       vs base         │
¹ need >= 6 samples for confidence interval at level 0.95

             │ build/main/bench.out │           bench.out           │
             │      allocs/op       │  allocs/op    vs base         │
¹ need >= 6 samples for confidence interval at level 0.95

pkg: github.com/elastic/apm-server/x-pack/apm-server/aggregation/spanmetrics
                 │ build/main/bench.out │           bench.out           │
                 │        sec/op        │    sec/op     vs base         │
¹ need >= 6 samples for confidence interval at level 0.95

                 │ build/main/bench.out │            bench.out             │
                 │         B/op         │     B/op       vs base           │
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                 │ build/main/bench.out │           bench.out            │
                 │      allocs/op       │  allocs/op   vs base           │
¹ need >= 6 samples for confidence interval at level 0.95
² 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         │
¹ need >= 6 samples for confidence interval at level 0.95

                        │ build/main/bench.out │           bench.out            │
                        │         B/op         │    B/op      vs base           │
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                        │ build/main/bench.out │           bench.out            │
                        │      allocs/op       │  allocs/op   vs base           │
¹ need >= 6 samples for confidence interval at level 0.95
² 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                  613.6n         619.4n        +0.93%
¹ need >= 6 samples for confidence interval at level 0.95

               │ build/main/bench.out │               bench.out               │
               │         B/op         │     B/op       vs base                │
geomean                             ³                  +0.51%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² 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%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² 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                │
WriteTransaction/json_codec-12                        4.242µ ± ∞ ¹   10.558µ ± ∞ ¹  +148.89% (p=0.016 n=5)
WriteTransaction/json_codec_big_tx-12                 5.022µ ± ∞ ¹   11.612µ ± ∞ ¹  +131.22% (p=0.008 n=5)
ReadEvents/json_codec/0_events-12                     310.4n ± ∞ ¹    354.0n ± ∞ ¹   +14.05% (p=0.008 n=5)
ReadEvents/json_codec_big_tx/0_events-12              315.6n ± ∞ ¹    353.4n ± ∞ ¹   +11.98% (p=0.032 n=5)
ReadEvents/nop_codec_big_tx/0_events-12               305.7n ± ∞ ¹    351.1n ± ∞ ¹   +14.85% (p=0.008 n=5)
ReadEvents/nop_codec_big_tx/199_events-12             235.4µ ± ∞ ¹    287.2µ ± ∞ ¹   +22.00% (p=0.008 n=5)
IsTraceSampled/sampled-12                             69.99n ± ∞ ¹    76.42n ± ∞ ¹    +9.19% (p=0.008 n=5)
IsTraceSampled/unsampled-12                           73.03n ± ∞ ¹    79.29n ± ∞ ¹    +8.57% (p=0.008 n=5)
geomean                                               29.45µ          31.71µ          +7.69%
¹ need >= 6 samples for confidence interval at level 0.95

                                            │ build/main/bench.out │               bench.out                │
                                            │         B/op         │      B/op       vs base                │
WriteTransaction/json_codec_big_tx-12                3.687Ki ± ∞ ¹    3.688Ki ± ∞ ¹  +0.03% (p=0.048 n=5)
ReadEvents/json_codec_big_tx/10_events-12            101.0Ki ± ∞ ¹    100.9Ki ± ∞ ¹  -0.07% (p=0.032 n=5)
ReadEvents/nop_codec/100_events-12                   244.7Ki ± ∞ ¹    244.5Ki ± ∞ ¹  -0.07% (p=0.008 n=5)
ReadEvents/nop_codec/1000_events-12                  2.081Mi ± ∞ ¹    2.086Mi ± ∞ ¹  +0.27% (p=0.040 n=5)
geomean                                              31.32Ki          31.45Ki        +0.41%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                                            │ build/main/bench.out │              bench.out               │
                                            │      allocs/op       │  allocs/op    vs base                │
geomean                                                144.7          144.7        +0.00%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

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

@kruskall kruskall merged commit 6669ffc into elastic:main Feb 22, 2023
@kruskall kruskall deleted the fix/deprecation-prefix-check branch February 22, 2023 03:26
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants