forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
69020: rttanalysis: add rttanalysisccl.TestBenchmarkExpectations r=postamar a=postamar Previously, we had no convenient way to adjust the roundtrip benchmark expectations in the CCL package. This commit adds a new test for this purpose and in so doing exports a bunch of test utilities in rttanalysis. Release note: None Co-authored-by: Marius Posta <[email protected]>
- Loading branch information
Showing
5 changed files
with
102 additions
and
63 deletions.
There are no files selected for viewing
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
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
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
18 changes: 9 additions & 9 deletions
18
pkg/ccl/benchccl/rttanalysisccl/testdata/benchmark_expectations
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
exp,benchmark | ||
25,AlterPrimaryRegion/alter_empty_database_alter_primary_region | ||
25,AlterPrimaryRegion/alter_empty_database_set_initial_primary_region | ||
25,AlterPrimaryRegion/alter_populated_database_alter_primary_region | ||
26,AlterPrimaryRegion/alter_populated_database_set_initial_primary_region | ||
22,AlterRegions/alter_empty_database_add_region | ||
23,AlterRegions/alter_empty_database_drop_region | ||
22,AlterRegions/alter_populated_database_add_region | ||
23,AlterRegions/alter_populated_database_drop_region | ||
25,AlterPrimaryRegion/alter_empty_database_set_initial_primary_region | ||
25,AlterPrimaryRegion/alter_empty_database_alter_primary_region | ||
26,AlterPrimaryRegion/alter_populated_database_set_initial_primary_region | ||
25,AlterPrimaryRegion/alter_populated_database_alter_primary_region | ||
25,AlterSurvivalGoals/alter_empty_database_from_zone_to_region | ||
25,AlterSurvivalGoals/alter_empty_database_from_region_to_zone | ||
65,AlterSurvivalGoals/alter_populated_database_from_zone_to_region | ||
25,AlterSurvivalGoals/alter_empty_database_from_zone_to_region | ||
65,AlterSurvivalGoals/alter_populated_database_from_region_to_zone | ||
65,AlterSurvivalGoals/alter_populated_database_from_zone_to_region | ||
24,AlterTableLocality/alter_from_global_to_rbr | ||
28,AlterTableLocality/alter_from_global_to_regional_by_table | ||
22,AlterTableLocality/alter_from_rbr_to_global | ||
22,AlterTableLocality/alter_from_rbr_to_regional_by_table | ||
28,AlterTableLocality/alter_from_regional_by_table_to_global | ||
24,AlterTableLocality/alter_from_global_to_rbr | ||
24,AlterTableLocality/alter_from_regional_by_table_to_rbr | ||
22,AlterTableLocality/alter_from_rbr_to_regional_by_table | ||
22,AlterTableLocality/alter_from_rbr_to_global |
30 changes: 30 additions & 0 deletions
30
pkg/ccl/benchccl/rttanalysisccl/validate_benchmark_data_test.go
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2021 The Cockroach Authors. | ||
// | ||
// Licensed as a CockroachDB Enterprise file under the Cockroach Community | ||
// License (the "License"); you may not use this file except in compliance with | ||
// the License. You may obtain a copy of the License at | ||
// | ||
// https://github.com/cockroachdb/cockroach/blob/master/licenses/CCL.txt | ||
|
||
package rttanalysisccl | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/cockroachdb/cockroach/pkg/bench/rttanalysis" | ||
"github.com/cockroachdb/cockroach/pkg/testutils/skip" | ||
) | ||
|
||
// TestBenchmarkExpectation runs all of the benchmarks and | ||
// one iteration and validates that the number of RPCs meets | ||
// the expectation. | ||
// | ||
// It takes a long time and thus is skipped under stress, race | ||
// and short. | ||
func TestBenchmarkExpectation(t *testing.T) { | ||
skip.UnderStress(t) | ||
skip.UnderRace(t) | ||
skip.UnderShort(t) | ||
|
||
rttanalysis.RunBenchmarkExpectationTests(t) | ||
} |