package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Packages
Package bulkingest defines a workload that is intended to stress some edge cases
in our bulk-ingestion infrastructure.
Package debug provides a workload subcommand under which useful workload utilities live.
Package schemachange implements the schemachange workload.
Package workloadimpl provides dependency-light helpers for implementing workload.Generators.
Package ycsb is the workload specified by the Yahoo! Cloud Serving Benchmark.
# Functions
ApproxDatumSize returns the canonical size of a datum as returned from a call to `Table.InitialRowFn`.
ColBatchToRows materializes the columnar data in a coldata.Batch into rows.
CSVMux returns a mux over http handlers for csv data in all tables in the given generators.
DistinctCount returns the expected number of distinct values in a column with rowCount rows, given that the values are chosen from maxDistinctCount possible values using uniform random sampling with replacement.
EmitDatadogEvent sends an event to Datadog if the passed in ctx has the necessary values to communicate with Datadog.
FromFlags returns a new validated generator with the given flags.
Get returns the registered Generator with the given name, if it exists.
HandleCSV configures a Generator with url params and outputs the data for a single Table as a CSV (optionally limiting the rows via `row-start` and `row-end` params).
MakeStat returns a JSONStatistic given the column names, row count, distinct count, and null count.
NewConnFlags returns an initialized ConnFlags.
NewDatadogContext adds values to the passed in ctx to configure it to communicate with Datadog.
NewMultiConnPool creates a new MultiConnPool.
NewMultiConnPoolCfgFromFlags constructs a new MultiConnPoolCfg object based on the connection flags.
NewRoundRobinDB creates a RoundRobinDB from the input list of database connection URLs.
Register is a hook for init-time registration of Generator implementations.
Registered returns all registered Generators.
SanitizeUrls verifies that the give SQL connection strings have the correct SQL database set, rewriting them in place if necessary.
SetUrlConnVars augments the provided URLs with additional query parameters which are used by the SQL server during connection establishment to configure default session variables.
SupportsFixtures returns whether the Generator supports initialization via fixtures.
Tuples is like TypedTuples except that it tries to guess the type of each datum.
TypedTuples returns a BatchedTuples where each batch has size 1.
WriteCSVRows writes the specified table rows as a csv.
# Constants
AutoStatsName is copied from stats.AutoStatsName to avoid pulling in a dependency on sql/stats.
ImportDataLoaderConcurrencyFlag that can be used to control import concurrency.
# Variables
ImportDataLoader is a hook for binaries that include CCL code to inject an IMPORT-based InitialDataLoader implementation.
# Structs
BatchedTuples is a generic generator of tuples (SQL rows, PKs to split at, etc).
ConnFlags is helper of common flags that are relevant to QueryLoads.
FlagMeta is metadata about a workload flag.
Flags is a container for flags and associated metadata.
Hooks stores functions to be called at points in the workload lifecycle.
JSONStatistic is copied from stats.JSONStatistic to avoid pulling in a dependency on sql/stats.
Meta is used to register a Generator at init time and holds meta information about this generator, including a name, description, and a function to create instances of it.
MultiConnPool maintains a set of pgx ConnPools (to different servers).
MultiConnPoolCfg encapsulates the knobs passed to NewMultiConnPool.
QueryLoad represents some SQL query workload performable on a database initialized with the requisite tables.
RoundRobinDB is a wrapper around *gosql.DB's that round robins individual queries among the different databases that it was created with.
SQLRunner is a helper for issuing SQL statements; it supports multiple methods for issuing queries.
StmtHandle is associated with a (possibly prepared) statement; created by SQLRunner.Define.
Table represents a single table in a Generator.
# Interfaces
ConnFlagser returns the connection flags this Generator is configured with.
Flagser returns the flags this Generator is configured with.
Generator represents one or more sql query loads and associated initial data.
Hookser returns any hooks associated with the generator.
InitialDataLoader loads the initial data for all tables in a workload.
Opser returns the work functions for this generator.
RandomSeed is the interface used by the workload runner to print the seed used in a run.