-
Notifications
You must be signed in to change notification settings - Fork 105
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
feat(observability): spin up micro-benchmarking framework #2163
Open
odeke-em
wants to merge
3
commits into
googleapis:main
Choose a base branch
from
odeke-em:observability-benchmarking
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pushing up more updates in a couple @alkatrivedi @surbhigarg92, but this PR is currently a draft. |
8edd742
to
f0eb7e5
Compare
d48777b
to
90fb9d7
Compare
This requires you to add to your environment SPANNER_RUN_BENCHMARKS=true and then it can be run by npm run observability-test whose results look like: ```shell Benchmarking Total Runs: 10000 databaseRunSelect1AsyncAwait RAM Untraced(206.453kB) vs Traced (240.953kB): increase by (34.500kB) or 16.71% RAM Untraced(206.453kB) vs Traced+OTEL(243.391kB): increase by (36.938kB) or 17.89% Time Untraced(911.057µs) vs Traced (1.014ms): increase by (102.749µs) or 11.28% Time Untraced(911.057µs) vs Traced+OTEL(1.017ms): increase by (106.116µs) or 11.65% databaseRunSelect1Callback RAM Untraced(210.219kB) vs Traced (238.797kB): increase by (28.578kB) or 13.59% RAM Untraced(210.219kB) vs Traced+OTEL(242.914kB): increase by (32.695kB) or 15.55% Time Untraced(890.877µs) vs Traced (997.541µs): increase by (106.664µs) or 11.97% Time Untraced(890.877µs) vs Traced+OTEL(1.019ms): increase by (127.997µs) or 14.37% databaseRunTransactionAsyncTxRunUpdate RAM Untraced(308.898kB) vs Traced (325.313kB): increase by (16.414kB) or 5.31% RAM Untraced(308.898kB) vs Traced+OTEL(339.836kB): increase by (30.938kB) or 10.02% Time Untraced(1.510ms) vs Traced (1.652ms): increase by (141.330µs) or 9.36% Time Untraced(1.510ms) vs Traced+OTEL(1.668ms): increase by (157.466µs) or 10.43% databaseRunTransactionAsyncTxRun RAM Untraced(298.977kB) vs Traced (326.227kB): increase by (27.250kB) or 9.11% RAM Untraced(298.977kB) vs Traced+OTEL(315.164kB): increase by (16.188kB) or 5.41% Time Untraced(1.450ms) vs Traced (1.581ms): increase by (130.870µs) or 9.03% Time Untraced(1.450ms) vs Traced+OTEL(1.615ms): increase by (165.426µs) or 11.41% ```
62ef9d8
to
2488550
Compare
… other code too We now have more isolated and more accurate values ```shell Benchmarking Database Total Runs: 20000 Warm up runs: 2500 databaseRunSelect1AsyncAwait RAM Untraced(209.906kB) vs Traced (224.453kB): increase by (14.547kB) or 6.93% RAM Untraced(209.906kB) vs Traced+OTEL(243.211kB): increase by (33.305kB) or 15.87% Time Untraced(901.139µs) vs Traced (918.845µs): increase by (17.706µs) or 1.96% Time Untraced(901.139µs) vs Traced+OTEL(1.019ms): increase by (118.223µs) or 13.12% databaseRunSelect1Callback RAM Untraced(209.789kB) vs Traced (224.641kB): increase by (14.852kB) or 7.08% RAM Untraced(209.789kB) vs Traced+OTEL(242.500kB): increase by (32.711kB) or 15.59% Time Untraced(902.862µs) vs Traced (920.289µs): increase by (17.427µs) or 1.93% Time Untraced(902.862µs) vs Traced+OTEL(1.027ms): increase by (124.280µs) or 13.77% databaseRunTransactionAsyncTxRunUpdate RAM Untraced(309.352kB) vs Traced (323.734kB): increase by (14.383kB) or 4.65% RAM Untraced(309.352kB) vs Traced+OTEL(324.258kB): increase by (14.906kB) or 4.82% Time Untraced(1.508ms) vs Traced (1.516ms): increase by (7.340µs) or 0.49% Time Untraced(1.508ms) vs Traced+OTEL(1.679ms): increase by (170.989µs) or 11.34% databaseRunTransactionAsyncTxRun RAM Untraced(299.117kB) vs Traced (311.320kB): increase by (12.203kB) or 4.08% RAM Untraced(299.117kB) vs Traced+OTEL(313.602kB): increase by (14.484kB) or 4.84% Time Untraced(1.460ms) vs Traced (1.469ms): increase by (8.468µs) or 0.58% Time Untraced(1.460ms) vs Traced+OTEL(1.679ms): increase by (219.068µs) or 15.00% ✔ Database runs compared (403854ms) Benchmark getTracer tracerProvider Total Runs: 20000 Warm up runs: 2500 withNullTracerProviderUnsetGlobalTracerProvider RAM (2.273kB) TimeSpent (12.171µs) withTracerDefinedTracerProvider RAM (2.695kB) TimeSpent (14.074µs) withTracerRegisteredGlobally RAM (2.727kB) TimeSpent (14.413µs) ```
2488550
to
4d5c897
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: spanner
Issues related to the googleapis/nodejs-spanner API.
size: l
Pull request size is large.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This requires you to add to your environment
and then it can be run by npm run observability-test whose results look like:
startTrace against 3 different scenarios
Database runs against mockspanner
from a quiet Linux machine
$ uname -a Linux emmanuel-PowerEdge-T30 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux