Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectContext ¶
Detect tries to detect the CIContext automatically If it cannot, it falls back to the values available in ExecCfg Note that it may return an invalid CIContext
func Exec ¶
Exec executes a program and exports its captured profiles It works by creating an in-memory pyroscope server Then overwriting the default serverAddress using the PYROSCOPE_ADHOC_SERVER_ADDRESS env var Which then is uploaded to a) a pyroscope server that supports the /ci API b) to a local directory c) both
Notice that it returns 2 different errors: cmdError refers to the error of the command exec'd and err to any other error
Types ¶
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
func (*Exporter) Export ¶
func (w *Exporter) Export(items map[string]flamebearer.FlamebearerProfile) error
Export exports each FlamebearerProfile into a JSON file
func (*Exporter) Write ¶
func (*Exporter) Write(path string, flame flamebearer.FlamebearerProfile) error
Write writes a flamebearer in json format to its dataDir
type FlamebearerMap ¶
type Ingester ¶
type Ingester struct {
// contains filtered or unexported fields
}
func NewIngester ¶
func NewIngester() *Ingester
func (*Ingester) GetIngestedItems ¶
func (i *Ingester) GetIngestedItems() map[string]flamebearer.FlamebearerProfile
type Putter ¶
func NewPutter ¶
func NewPutter() *Putter
NewPutter creates a Putter that stores Put data into memory Which can then be retrieved via GetPutItems
func (*Putter) GetPutItems ¶
func (p *Putter) GetPutItems() map[string]flamebearer.FlamebearerProfile
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) Run ¶
func (p *Runner) Run(args []string) (map[string]flamebearer.FlamebearerProfile, time.Duration, error)
Run executes a command while running a server that ingests data at the /ingest endpoint And returns all data that was ingested
type UploadConfig ¶
type UploadConfig struct {
// contains filtered or unexported fields
}
type Uploader ¶
type Uploader struct {
// contains filtered or unexported fields
}
func NewUploader ¶
func NewUploader(logger *logrus.Logger, cfg UploadConfig) *Uploader
func (*Uploader) Upload ¶
func (u *Uploader) Upload(ctx context.Context, items map[string]flamebearer.FlamebearerProfile) error
Upload uploads files to the target server's /api/ci-events endpoint It assumes all cfg values are non-zero