-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
testing_knobs.go
49 lines (42 loc) · 1.89 KB
/
testing_knobs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright 2022 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package eval
import (
"github.com/cockroachdb/cockroach/pkg/base"
"github.com/cockroachdb/cockroach/pkg/clusterversion"
)
// TestingKnobs contains test knobs.
type TestingKnobs struct {
// AssertFuncExprReturnTypes indicates whether FuncExpr evaluations
// should assert that the returned Datum matches the expected
// ReturnType of the function.
AssertFuncExprReturnTypes bool
// AssertUnaryExprReturnTypes indicates whether UnaryExpr evaluations
// should assert that the returned Datum matches the expected
// ReturnType of the function.
AssertUnaryExprReturnTypes bool
// AssertBinaryExprReturnTypes indicates whether BinaryExpr
// evaluations should assert that the returned Datum matches the
// expected ReturnType of the function.
AssertBinaryExprReturnTypes bool
// DisableOptimizerRuleProbability is the probability that any given
// transformation rule in the optimizer is disabled.
DisableOptimizerRuleProbability float64
// OptimizerCostPerturbation is used to randomly perturb the estimated
// cost of each expression in the query tree for the purpose of creating
// alternate query plans in the optimizer.
OptimizerCostPerturbation float64
// If set, mutations.MaxBatchSize, row.getKVBatchSize, and other values
// randomized via the metamorphic testing will be overridden to use the
// production value.
ForceProductionValues bool
CallbackGenerators map[string]*CallbackValueGenerator
// We use clusterversion.Key rather than a roachpb.Version because it will be used
// to get initial values to use during bootstrap.
TenantLogicalVersionKeyOverride clusterversion.Key
}
var _ base.ModuleTestingKnobs = &TestingKnobs{}
// ModuleTestingKnobs is part of the base.ModuleTestingKnobs interface.
func (*TestingKnobs) ModuleTestingKnobs() {}