-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
server: rewrite telemetry tests #46730
Comments
i was looking at doing something like kvtrace and SELECT the feature counts before/after a statement was executed from the crdb_internal.feature_counts table, and comparing that and giving the deltas, e.g.
your solution of having an entry point into a mock recorder sounds more clean though |
46778: sqltelemetry: add CANCEL QUERIES and CANCEL SESSIONS telemetry r=yuzefovich a=asubiotto Release note: None (internal telemetry change) Closes #45103 Not sure whether we want to distinguish between CANCEL QUERY vs QUERIES use and CANCEL SESSION vs SESSIONS use (or even how to). So just added one counter for each statement type which is probably good enough. Tested this manually but holding off on writing tests since I've heard some work will be done on #46730 Co-authored-by: Alfonso Subiotto Marques <alfonso@cockroachlabs.com>
This commit adds `sql.TestTelemetry` which uses a datadriven approach to telemetry testing. See the comment for that function for more details. `TestCBOReportUsage` is converted to a datadriven test. Similar tests should be moved over in subsequent changes. Informs cockroachdb#46730. Release note: None
This commit adds `sql.TestTelemetry` which uses a datadriven approach to telemetry testing. See the comment for that function for more details. `TestCBOReportUsage` is converted to a datadriven test. Similar tests should be moved over in subsequent changes. Informs cockroachdb#46730. Release note: None
47133: sql: datadriven telemetry tests r=RaduBerinde a=RaduBerinde #### server: clean up telemetry URL code This change moves the code related to diagnostics URLs to `diagnosicspb` and adds infrastructure to override the URLs via testing knobs (rather than fiddling with global values). Release note: None #### server: move mockRecorder Move `mockRecorder` to `diagutil.Server` and clean up the API. Release note: None #### sql: add datadriven telemetry tests This commit adds `sql.TestTelemetry` which uses a datadriven approach to telemetry testing. See the comment for that function for more details. `TestCBOReportUsage` is converted to a datadriven test. Similar tests should be moved over in subsequent changes. Informs #46730. Release note: None Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
46778: sqltelemetry: add CANCEL QUERIES and CANCEL SESSIONS telemetry r=yuzefovich a=asubiotto Release note: None (internal telemetry change) Closes #45103 Not sure whether we want to distinguish between CANCEL QUERY vs QUERIES use and CANCEL SESSION vs SESSIONS use (or even how to). So just added one counter for each statement type which is probably good enough. Tested this manually but holding off on writing tests since I've heard some work will be done on #46730 Co-authored-by: Alfonso Subiotto Marques <alfonso@cockroachlabs.com>
We have marked this issue as stale because it has been inactive for |
We converted part of the tests, I don't think there are any plans for work here any time soon. |
The telemetry tests in
pkg/server/updates_test.go
are very hard to work with which limits the testing area. These should be rewritten using a datadriven approach. We can separate the mock recorder in a package and use it to output a list of counters that changed; the actual tests could then be moved to more appropriate packages (e.g. sqltelemetry).The text was updated successfully, but these errors were encountered: