Documentation ¶
Index ¶
- func AvailableFormatsForCLI() string
- func AvailableSortFieldsForCLI() string
- func IsValidFormatName(formatName string) bool
- func IsValidSortFieldName(fieldName string) bool
- func NewReplaceRule(regexpStr, replace string) (*replaceRule, error)
- func SortProfileBy(profile TaskStepProfileResult, fieldName string) error
- func WriteJSON(w io.Writer, profileResult ProfileInput) (err error)
- func WriteTSV(w io.Writer, profileResult ProfileInput) error
- func WriteTable(w io.Writer, profileResult ProfileInput, markdown bool) error
- func WriteWithFormat(w io.Writer, profileResult ProfileInput, format string) error
- type Client
- func (c Client) GetWorkflowJobByID(ctx context.Context, owner, repo string, jobID int64) (*github.WorkflowJob, *github.Response, error)
- func (c Client) ListWorkflowJobs(ctx context.Context, owner, repo string, runID int64, ...) (*github.Jobs, *github.Response, error)
- func (c Client) ListWorkflowRunsByFileName(ctx context.Context, owner, repo, workflowFileName string, ...) (*github.WorkflowRuns, *github.Response, error)
- type ClientConfig
- type ProfileConfig
- type ProfileConfigCLIArgs
- type ProfileForFormatter
- type ProfileInput
- type TaskStepProfile
- type TaskStepProfileResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvailableFormatsForCLI ¶
func AvailableFormatsForCLI() string
func AvailableSortFieldsForCLI ¶
func AvailableSortFieldsForCLI() string
func IsValidFormatName ¶
func IsValidSortFieldName ¶
func NewReplaceRule ¶
func SortProfileBy ¶
func SortProfileBy(profile TaskStepProfileResult, fieldName string) error
func WriteTable ¶
func WriteTable(w io.Writer, profileResult ProfileInput, markdown bool) error
func WriteWithFormat ¶
func WriteWithFormat(w io.Writer, profileResult ProfileInput, format string) error
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithConfig ¶
func NewClientWithConfig(ctx context.Context, config *ClientConfig) *Client
func (Client) GetWorkflowJobByID ¶
func (Client) ListWorkflowJobs ¶
func (Client) ListWorkflowRunsByFileName ¶
type ClientConfig ¶
type ProfileConfig ¶
type ProfileConfig struct { Owner string `toml:"owner"` Repository string `toml:"repository"` WorkflowFileName string `toml:"workflow-file"` Cache bool `toml:"cache"` CacheDirectory string `toml:"cache-directory"` Concurrency int `toml:"concurrency"` NumberOfJob int `toml:"number-of-job"` AccessToken string `toml:"access-token"` Format string `toml:"format"` SortBy string `toml:"sort"` Reverse bool `toml:"reverse"` Verbose bool `toml:"verbose"` JobNameRegexp string `toml:"job-name-regexp"` Replace []replaceRule `toml:"replace_rule"` }
func DefaultProfileConfig ¶
func DefaultProfileConfig() *ProfileConfig
func LoadConfigFromTOML ¶
func LoadConfigFromTOML(filename string) (*ProfileConfig, error)
func OverrideCLIArgs ¶
func OverrideCLIArgs(tomlConfig *ProfileConfig, cliArgs *ProfileConfigCLIArgs) (newConfig *ProfileConfig)
func (ProfileConfig) Dump ¶
func (c ProfileConfig) Dump() string
func (ProfileConfig) Validate ¶
func (config ProfileConfig) Validate() error
type ProfileConfigCLIArgs ¶
type ProfileConfigCLIArgs struct { AccessToken *string `long:"access-token" description:"Access token for GitHub"` Cache *bool `long:"cache" description:"Enable disk cache" default-mask:"true"` CacheDirectory *string `long:"cache-dir" description:"Where to store cache data"` Concurrency *int `long:"concurrency" short:"j" description:"Concurrency of GitHub API client" default-mask:"2"` ConfigPath *string `long:"config" description:"Path to configuration TOML file"` NumberOfJob *int `long:"number-of-job" short:"n" description:"The number of job to analyze" default-mask:"20"` Format *string `` /* 132-byte string literal not displayed */ JobNameRegexp *string `long:"job-name-regexp" description:"Filter regular expression for a job name"` Owner *string `long:"owner" description:"Repository owner name"` Repository *string `long:"repository" description:"Repository name"` Reverse *bool `long:"reverse" short:"r" description:"Reverse the result of sort" default-mask:"false"` SortBy *string `long:"sort" short:"s" description:"A field name to sort by" default-mask:"number"` Verbose *bool `long:"verbose" description:"Verbose mode"` WorkflowFileName *string `long:"workflow-file" description:"Workflow file name"` }
ProfileConfigCLIArgs is a set of option from command-line arguments see DefaultProfileConfig() in config.go for more details
type ProfileForFormatter ¶
type ProfileForFormatter struct { Name string `json:"name"` Profile []*TaskStepProfile `json:"profile"` }
type ProfileInput ¶
type ProfileInput []*ProfileForFormatter
type TaskStepProfile ¶
type TaskStepProfile struct { Name string `json:"name"` Number int64 `json:"number"` Min float64 `json:"min"` Max float64 `json:"max"` Median float64 `json:"median"` Mean float64 `json:"mean"` Percentile50 float64 `json:"50percentile"` Percentile90 float64 `json:"90percentile"` Percentile95 float64 `json:"95percentile"` Percentile99 float64 `json:"99percentile"` }
type TaskStepProfileResult ¶
type TaskStepProfileResult = []*TaskStepProfile
func ProfileTaskStep ¶
func ProfileTaskStep(steps []*github.TaskStep) (profileResult TaskStepProfileResult, err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.