Documentation ¶
Overview ¶
Package vet is a Beam runner that "runs" a pipeline by producing generated code to avoid symbol table lookups and reflection in pipeline execution.
This runner isn't necessarily intended to be run by itself. Other runners can use this as a sanity check on whether a given pipeline avoids known performance bottlenecks.
TODO(BEAM-7374): Add usage documentation.
Index ¶
- func Execute(ctx context.Context, p *beam.Pipeline) error
- func NameType(t reflect.Type) string
- type Eval
- func (e *Eval) AllExported() bool
- func (e *Eval) Bytes() []byte
- func (e *Eval) Generate(packageName string)
- func (e *Eval) Performant() bool
- func (e *Eval) Print(s string)
- func (e *Eval) Printf(f string, args ...interface{})
- func (e *Eval) RequiresRegistrations() bool
- func (e *Eval) UsesDefaultReflectionShims() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Eval ¶
type Eval struct {
// contains filtered or unexported fields
}
Eval contains and uniquifies the cache of types and things that need to be generated.
func (*Eval) AllExported ¶
AllExported returns whether all values in the pipeline are exported, and thus it may be possible to patch the pipeline's package with generated shims. Using exported vs unexported identifiers does not affect pipeline performance but does matter on if the pipeline package can do anything about it.
func (*Eval) Performant ¶
Performant returns whether this pipeline needs additional registrations to avoid reflection, or symbol lookups at runtime.
func (*Eval) RequiresRegistrations ¶
RequiresRegistrations returns if there are any types or functions that require registrations.
func (*Eval) UsesDefaultReflectionShims ¶
UsesDefaultReflectionShims returns whether the default reflection shims are going to be used by the pipeline.
Directories ¶
Path | Synopsis |
---|---|
Package testpipeline exports small test pipelines for testing the vet runner.
|
Package testpipeline exports small test pipelines for testing the vet runner. |