v.io: v.io/x/ref/services/ben/benarchd/internal Index | Files | Directories

package internal

import "v.io/x/ref/services/ben/benarchd/internal"


Package Files

assets.go http.go server.go sql_store.go store.go

func Authorizer Uses

func Authorizer() security.Authorizer

Authorizer implements an authorization policy that authorizes callers with any recognizeable blessing name.

func NewArchiver Uses

func NewArchiver(store Store, url string) archive.BenchmarkArchiverServerStub

NewArchiver returns an archive.BenchmarkArchiver server that uses store to persist data and provides a UI to browse archived benchmark results at url.

func NewHTTPHandler Uses

func NewHTTPHandler(assets *Assets, store Store) http.Handler

NewHTTPHandler returns a handler that provides web interface for browsing benchmark results in store.

type Assets Uses

type Assets struct {
    // contains filtered or unexported fields

func NewAssets Uses

func NewAssets(dir string) (*Assets, error)

NewAssets returns an object that provides compiled-in assets if dir is empty or reads them from dir otherwise.

A non-empty dir is typically provided when iterating on the contents of the assets before release.

func (*Assets) File Uses

func (a *Assets) File(name string) ([]byte, error)

func (*Assets) Template Uses

func (a *Assets) Template(name string) (*template.Template, error)

type Benchmark Uses

type Benchmark struct {
    ID       string       // A unique identifier of this particular Benchmark
    Name     string       // Name (e.g. v.io/v23/security.BenchmarkSign) of the Benchmark.
    Scenario ben.Scenario // The scenario under which the benchmark was run.
    Uploader string       // Identity of the user that uploaded the results.

    // Results from most recently uploaded runs for this benchmark.
    NanoSecsPerOp   float64
    MegaBytesPerSec float64
    LastUpdate      time.Time

Benchmark identifies a particular (Benchmark, Scenario, Uploader) tuple. Many ben.Run objects are associated with a single Benchmark.

func (Benchmark) PrettyTime Uses

func (b Benchmark) PrettyTime() string

type BenchmarkIterator Uses

type BenchmarkIterator interface {
    Value() Benchmark
    Runs() RunIterator

type Iterator Uses

type Iterator interface {
    Advance() bool
    Err() error

type Query Uses

type Query struct {
    Name     string
    CPU      string
    OS       string
    Uploader string
    Label    string

func ParseQuery Uses

func ParseQuery(query string) (*Query, error)

ParseQuery converts a query string into a structured Query object.

The query language supports setting each field in the Query object at most once and the query will be an AND of all terms. A more expressive query language is left as an exercise to a future enthusiast.

func (*Query) String Uses

func (q *Query) String() string

type RunIterator Uses

type RunIterator interface {
    Value() (run ben.Run, sourceCodeID string, uploadTime time.Time)

type Store Uses

type Store interface {
    Save(ctx *context.T, scenario ben.Scenario, code ben.SourceCode, uploader string, uploadTime time.Time, runs []ben.Run) error
    Benchmarks(query *Query) BenchmarkIterator
    Runs(benchmarkID string) (Benchmark, RunIterator)
    DescribeSource(id string) (ben.SourceCode, error)

func NewSQLStore Uses

func NewSQLStore(driver string, db *sql.DB) (Store, error)

NewSQLStore returns a Store implementation that uses the provided database for persistent storage.



Package internal imports 20 packages (graph) and is imported by 5 packages. Updated 2021-01-28. Refresh now. Tools for package owners.