gcp

package module
v7.0.0-...-85fa844 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//("benchmark", "Run benchmarks of provider test programs and compare with recorded values")
	BenchmarkFlag = hardcodedFlag{/* contains filtered or unexported fields */}
	//("record-benchmark", "Run benchmarks of provider test programs and record results")
	RecordBenchmarkFlag = hardcodedFlag{/* contains filtered or unexported fields */}
)

providertest doesn't expose a real flags implementation, so just pretend for now

Functions

func Provider

func Provider() tfbridge.ProviderInfo

Provider returns additional overlaid schema and metadata associated with the gcp package.

func RunBenchmark

func RunBenchmark(t *testing.T, bench BenchmarkConfig)

Runs a benchmark test using the provider BenchmarkConfig

Types

type BenchmarkConfig

type BenchmarkConfig struct {
	// Name of the benchmark (normally use the folder name)
	Name string

	// Location of the program to benchmark
	ProgramDir string

	// Primary provider (such as aws) the benchmark is testing
	Provider string

	// Primary runtime set in Pulumi.yaml
	Runtime string

	// Main programming language in the benchmark
	Language string

	// Repository where the benchmark is found, such as `pulumi/templates`
	Repository string

	// How often to sample memory stats
	MemstatsPollInterval time.Duration

	// Where to store traces
	TracingDir string

	// Where to store Benchmark results
	RecordDir string

	// How many times to run the benchmark and collect traces
	Samples int

	// Extra ProgramTestOptions
	Options integration.ProgramTestOptions
}

Configuration for a benchmark used for tracking performance with `pulumi --tracing`.

func NewBenchmark

func NewBenchmark(name, provider, runtime, lang, repo string) BenchmarkConfig

Helper for configuring a Benchmark test with defaults

func (*BenchmarkConfig) Env

func (b *BenchmarkConfig) Env() []string

Computes a list of `K=V` environment variables that will inform `pulumi --tracing` how to tag the data it produces.

func (*BenchmarkConfig) PrewarmProgramTestOptions

func (b *BenchmarkConfig) PrewarmProgramTestOptions() integration.ProgramTestOptions

Options for a warm up run that ensures plugins are downloaded

func (*BenchmarkConfig) TracingProgramTestOptions

func (b *BenchmarkConfig) TracingProgramTestOptions() integration.ProgramTestOptions

Ensures `ProgramTest` uses appropriate `--tracing` options.

type CsvFileSpanIter

type CsvFileSpanIter struct {
	File string
}

Iterates over spans stored in CSV format

func (CsvFileSpanIter) WalkSpans

func (i CsvFileSpanIter) WalkSpans(onSpan func(s Span) error) error

type MultiSpanIter

type MultiSpanIter struct {
	Iters []SpanIter
}

Convenience type for iterating over multiple SpanIters in sequence

func (MultiSpanIter) WalkSpans

func (i MultiSpanIter) WalkSpans(onSpan func(s Span) error) error

type Span

type Span map[string]string

Convenience type for attaching helpers to string map that represents a span

func (Span) Duration

func (s Span) Duration() (time.Duration, error)

func (Span) End

func (s Span) End() (time.Time, error)

func (Span) Start

func (s Span) Start() (time.Time, error)

type SpanIter

type SpanIter interface {
	WalkSpans(onSpan func(x Span) error) error
}

Interface to generalize iterating over all spans from various trace formats

type TraceDirSpanIter

type TraceDirSpanIter struct {
	// contains filtered or unexported fields
}

Iterate over spans from all .trace files in a directory

func (TraceDirSpanIter) WalkSpans

func (i TraceDirSpanIter) WalkSpans(onSpan func(s Span) error) error

type TraceFileSpanIter

type TraceFileSpanIter struct {
	File string
}

Iterates over spans stored in appDash's trace file format

func (TraceFileSpanIter) WalkSpans

func (i TraceFileSpanIter) WalkSpans(onSpan func(s Span) error) error

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL