package app
import "golang.org/x/build/perf/app"
Package app implements the performance data analysis server.
Index ¶
- func AdaptiveKolmogorovZurbenko(xs []float64, m, k int) []float64
- func KolmogorovZurbenko(xs []float64, m, k int) []float64
- func MovingAverage(xs []float64, m int) []float64
- type App
- type BenchmarkJSON
- type BenchmarkKey
- type BenchmarksJSON
- type Commit
- type DataJSON
- type FormFieldsJSON
- type RegressionJSON
- type ValueJSON
Functions ¶
func AdaptiveKolmogorovZurbenko ¶
AdaptiveKolmogorovZurbenko performs an adaptive Kolmogorov-Zurbenko (KZA) filter of xs using an initial window size m and k iterations. m must be a positive odd integer. k must be positive.
See Zurbenko, et al. 1996: Detecting discontinuities in time series of upper air data: Demonstration of an adaptive filter technique. Journal of Climate, 9, 3548–3560.
func KolmogorovZurbenko ¶
KolmogorovZurbenko performs a Kolmogorov-Zurbenko (KZ) filter of xs with window size m and k iterations. m must be a positive odd integer. k must be positive.
func MovingAverage ¶
MovingAverage performs a moving average (MA) filter of xs with window size m. m must be a positive odd integer.
Note that this is filter is often described in terms of the half length of the window (m-1)/2.
Types ¶
type App ¶
type App struct { // StorageClient is used to talk to the perfdata server. StorageClient *perfdata.Client // BaseDir is the directory containing the "template" directory. // If empty, the current directory will be used. BaseDir string // InfluxHost is the host URL of the perf InfluxDB server. InfluxHost string // InfluxToken is the Influx auth token for connecting to InfluxHost. // // If empty, we attempt to fetch the token from Secret Manager using // InfluxProject. InfluxToken string // InfluxProject is the GCP project ID containing the InfluxDB secrets. // // If empty, this defaults to the project this service is running as. // // Only used if InfluxToken is empty. InfluxProject string // AuthCronEmail is the service account email which requests to // /cron/syncinflux must contain an OICD authentication token for, with // audience "/cron/syncinflux". // // If empty, no authentication is required. AuthCronEmail string }
App manages the analysis server logic. Construct an App instance and call RegisterOnMux to connect it with an HTTP server.
func (*App) RegisterOnMux ¶
RegisterOnMux registers the app's URLs on mux.
type BenchmarkJSON ¶
type BenchmarkJSON struct { Name string Unit string Platform string HigherIsBetter bool // These will be sorted by CommitDate. Values []ValueJSON Regression *RegressionJSON }
BenchmarkJSON contains the timeseries values for a single benchmark name + unit.
We could try to shoehorn this into benchfmt.Result, but that isn't really the best fit for a graph.
type BenchmarkKey ¶
type BenchmarksJSON ¶
type BenchmarksJSON struct { Benchmarks []BenchmarkKey Commits []Commit }
BenchmarksJSON is the result of accessing the benchmarks.json endpoint.
type Commit ¶
type DataJSON ¶
type DataJSON struct { Benchmarks []*BenchmarkJSON }
DataJSON is the result of accessing the data.json endpoint.
type FormFieldsJSON ¶
type RegressionJSON ¶
type RegressionJSON struct { Change float64 // endpoint regression, if any DeltaIndex int // index at which largest increase of regression occurs Delta float64 // size of that changes IgnoredBecause string // contains filtered or unexported fields }
type ValueJSON ¶
type ValueJSON struct { CommitHash string CommitDate time.Time BaselineCommitHash string BenchmarksCommitHash string // These are pre-formatted as percent change. Low float64 Center float64 High float64 }
Source Files ¶
app.go compare.go dashboard.go index.go influx.go kza.go parse.go
Directories ¶
Path | Synopsis |
---|---|
perf/app/internal |
- Version
- v0.0.0-20250421191922-3619c213cff3 (latest)
- Published
- Apr 21, 2025
- Platform
- linux/amd64
- Imports
- 47 packages
- Last checked
- 2 months ago –
Tools for package owners.