package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Packages
Package mixedversion implements a framework for testing functionality when a cluster is in a mixed-version state.
# Functions
CheckInvalidDescriptors returns an error if there exists any descriptors in the crdb_internal.invalid_objects virtual table.
CheckReplicaDivergenceOnDB runs a consistency check via the provided DB.
CloseExporter closes the exporter and also upload the metrics artifacts to a stats file in the node.
CreateWorkloadHistogramExporter creates a exporter.Exporter based on the roachtest parameters with no labels.
CreateWorkloadHistogramExporterWithLabels creates a exporter.Exporter based on the roachtest parameters with additional labels.
DefaultHTTPClient returns a default RoachtestHTTPClient.
DownloadProfiles downloads all profiles from the cluster and saves them to the given artifacts directory to the stmtbundle sub-directory.
Every is a convenience constructor for an EveryN object that allows a log message every n duration.
Fingerprint returns a fingerprint of `db.table`.
GetBenchmarkMetricsFileName returns the file name to store the benchmark output.
GetDiskUsageInBytes executes the command `du {store-dir}` on node `nodeIdx` and parses the result to bytes.
GetEnvWorkloadDurationValueOrDefault validates EnvWorkloadDurationFlag and returns value set if valid else returns default duration.
Returns the mean over the last n samples.
GetWorkloadHistogramArgs creates a histogram flag string based on the roachtest to pass to workload binary This is used to make use of t.ExportOpenmetrics() method and create appropriate exporter.
InstallLaunchAndConfigureJaegerAllInOne sets up jaeger on n1 and changes the cluster settings so that tracing is globally on and directed at the jaeger collector.
MakeLoadGroups create a loadGroupList that has an equal number of cockroach nodes per zone.
MaybeUseMemoryBudget returns a StartOpts with the specified --max-sql-memory if runtime assertions are enabled, and the default values otherwise.
MeasureQPS will measure the approx QPS at the time this command is run.
NewCommand builds a command.
NewDiskUsageLogger populates a DiskUsageLogger.
NewHealthChecker returns a populated HealthChecker.
profDbName is the database name to profile against.
ProfileTopStatements enables profile collection on the top statements from the cluster that exceed 50ms latency and are more than 10x the P99 up to this point.
profMinimumLatency is the minimum P99 latency in seconds.
profMinNumExpectedStmtsis the minimum number of times the statement must be executed to be included.
profMultipleFromP99is the multiple of the P99 latency that the statement must exceed in order to be collected.
profProbabilityToInclude is the probability that a statement will have tracing started on it.
SetAdmissionControl sets the admission control cluster settings on the given cluster.
SetDefaultAdminUIPort sets the AdminUI port to the default of 26258 if it is a non-local cluster.
SetDefaultSQLPort sets the SQL port to the default of 26257 if it is a non-local cluster.
SystemInterfaceSystemdUnitName is a convenience function that returns the systemd unit name for the system interface.
UploadPerfStats creates stats file from buffer in the node.
UsingRuntimeAssertions returns true if calls to `t.Cockroach()` for this test will return the cockroach build with runtime assertions.
validateTokensReturned ensures that all RACv2 tokens are returned to the pool at the end of the test.
WaitFor3XReplication is like WaitForReplication but specifically requires three as the minimum number of voters a range must be replicated on.
WaitForReady waits until the given nodes report ready via health checks.
WaitForReplication waits until all ranges in the system are on at least or exactly replicationFactor number of voters, depending on the supplied waitForReplicationType.
WaitForSQLReady waits until the corresponding node's SQL subsystem is fully initialized and ready to serve SQL clients.
WaitForUpdatedReplicationReport waits for an updated replication report.
# Constants
atleastReplicationFactor indicates all ranges in the system should have at least the replicationFactor number of replicas.
EnvWorkloadDurationFlag - environment variable to override default run time duration of workload set in tests.
exactlyReplicationFactor indicates that all ranges in the system should have exactly the replicationFactor number of replicas.
# Structs
Command wraps a command to be run in a cluster.
DiskUsageLogger regularly logs the disk spaced used by the nodes in the cluster.
DiskUsageTracker can grab the disk usage of the provided cluster.
EveryN provides a way to rate limit noisy log messages.
HealthChecker runs a regular check that verifies that a specified subset of (CockroachDB) nodes look "very healthy".
RoachtestHTTPClient is a wrapper over httputil.client that: - Adds cookies for every request, allowing the client to authenticate with secure clusters.