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

feat(observability): spin up micro-benchmarking framework #2163

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

odeke-em
Copy link
Contributor

@odeke-em odeke-em commented Oct 17, 2024

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:

  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%

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

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/nodejs-spanner API. labels Oct 17, 2024
@odeke-em
Copy link
Contributor Author

Pushing up more updates in a couple @alkatrivedi @surbhigarg92, but this PR is currently a draft.

@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Oct 20, 2024
@odeke-em odeke-em force-pushed the observability-benchmarking branch 3 times, most recently from dc98652 to 8ad5a54 Compare October 23, 2024 03:06
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%
```
@odeke-em odeke-em changed the title feat(observability): spin up benchmarking against the Spanner emulator feat(observability): spin up micro-benchmarking framework Oct 24, 2024
@odeke-em odeke-em marked this pull request as ready for review October 24, 2024 09:53
@odeke-em odeke-em requested review from a team as code owners October 24, 2024 09:53
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant