Documentation ¶
Index ¶
- type CustomMetric
- type CustomMetricSet
- type DiffCustomMetric
- type DiffCustomMetricSet
- type DiffReport
- type DiffTestExecutionTime
- type MetadataKV
- type Option
- type Options
- type Report
- func (r *Report) Bytes() []byte
- func (r *Report) CodeToTestRatioRatio() float64
- func (r *Report) CollectCustomMetrics() error
- func (r *Report) Compare(r2 *Report) *DiffReport
- func (r *Report) CountMeasured() int
- func (r *Report) CoveragePercent() float64
- func (r *Report) FileCoveragesTable(files []*gh.PullRequestFile) string
- func (r *Report) IsCollectedCustomMetrics() bool
- func (r *Report) IsMeasuredCodeToTestRatio() bool
- func (r *Report) IsMeasuredCoverage() bool
- func (r *Report) IsMeasuredTestExecutionTime() bool
- func (r *Report) Key() string
- func (r *Report) Load(path string) error
- func (r *Report) MeasureCodeToTestRatio(root string, code, test []string) error
- func (r *Report) MeasureCoverage(paths, exclude []string) error
- func (r *Report) MeasureTestExecutionTime(ctx context.Context, stepNames []string) error
- func (r *Report) Out(w io.Writer) error
- func (r *Report) String() string
- func (r *Report) Table() string
- func (r *Report) TestExecutionTimeNano() float64
- func (r *Report) Title() string
- func (r *Report) UnmarshalJSON(b []byte) error
- func (r *Report) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomMetric ¶ added in v0.51.0
type CustomMetric struct { Key string `json:"key"` Name string `json:"name,omitempty"` Value float64 `json:"value"` Unit string `json:"unit,omitempty"` }
func (*CustomMetric) Compare ¶ added in v0.51.0
func (m *CustomMetric) Compare(m2 *CustomMetric) *DiffCustomMetric
type CustomMetricSet ¶ added in v0.51.0
type CustomMetricSet struct { Key string `json:"key"` Name string `json:"name,omitempty"` Metadata []*MetadataKV `json:"metadata,omitempty"` Metrics []*CustomMetric `json:"metrics"` // contains filtered or unexported fields }
func (*CustomMetricSet) Compare ¶ added in v0.51.0
func (s *CustomMetricSet) Compare(s2 *CustomMetricSet) *DiffCustomMetricSet
func (*CustomMetricSet) MetadataTable ¶ added in v0.52.0
func (s *CustomMetricSet) MetadataTable() string
func (*CustomMetricSet) Table ¶ added in v0.51.0
func (s *CustomMetricSet) Table() string
func (*CustomMetricSet) Validate ¶ added in v0.51.0
func (s *CustomMetricSet) Validate() error
type DiffCustomMetric ¶ added in v0.51.0
type DiffCustomMetricSet ¶ added in v0.51.0
type DiffCustomMetricSet struct { Key string `json:"key"` Name string `json:"name,omitempty"` A *CustomMetricSet `json:"a"` B *CustomMetricSet `json:"b"` Metrics []*DiffCustomMetric `json:"metrics"` }
func (*DiffCustomMetricSet) MetadataTable ¶ added in v0.52.0
func (d *DiffCustomMetricSet) MetadataTable() string
func (*DiffCustomMetricSet) Table ¶ added in v0.51.0
func (d *DiffCustomMetricSet) Table() string
type DiffReport ¶ added in v0.20.0
type DiffReport struct { RepositoryA string `json:"repository_a"` RepositoryB string `json:"repository_b"` RefA string `json:"ref_a"` RefB string `json:"ref_b"` CommitA string `json:"commit_a"` CommitB string `json:"commit_b"` Coverage *coverage.DiffCoverage `json:"coverage,omitempty"` CodeToTestRatio *ratio.DiffRatio `json:"code_to_test_ratio,omitempty"` TestExecutionTime *DiffTestExecutionTime `json:"test_execution_time,omitempty"` CustomMetrics []*DiffCustomMetricSet `json:"custom_metrics,omitempty"` TimestampA time.Time `json:"timestamp_a"` TimestampB time.Time `json:"timestamp_b"` ReportA *Report `json:"-"` ReportB *Report `json:"-"` }
func (*DiffReport) FileCoveragesTable ¶ added in v0.58.1
func (d *DiffReport) FileCoveragesTable(files []*gh.PullRequestFile) string
func (*DiffReport) Out ¶ added in v0.20.0
func (d *DiffReport) Out(w io.Writer)
func (*DiffReport) Table ¶ added in v0.20.0
func (d *DiffReport) Table() string
type DiffTestExecutionTime ¶ added in v0.20.0
type MetadataKV ¶ added in v0.52.0
type Report ¶
type Report struct { Repository string `json:"repository"` Ref string `json:"ref"` Commit string `json:"commit"` Coverage *coverage.Coverage `json:"coverage,omitempty"` CodeToTestRatio *ratio.Ratio `json:"code_to_test_ratio,omitempty"` TestExecutionTime *float64 `json:"test_execution_time,omitempty"` Timestamp time.Time `json:"timestamp"` CustomMetrics []*CustomMetricSet `json:"custom_metrics,omitempty"` // contains filtered or unexported fields }
func (*Report) CodeToTestRatioRatio ¶ added in v0.6.0
func (*Report) CollectCustomMetrics ¶ added in v0.51.0
CollectCustomMetrics collects custom metrics from env.
func (*Report) Compare ¶ added in v0.20.0
func (r *Report) Compare(r2 *Report) *DiffReport
func (*Report) CountMeasured ¶ added in v0.12.0
func (*Report) CoveragePercent ¶
func (*Report) FileCoveragesTable ¶ added in v0.58.1
func (r *Report) FileCoveragesTable(files []*gh.PullRequestFile) string
func (*Report) IsCollectedCustomMetrics ¶ added in v0.51.0
func (*Report) IsMeasuredCodeToTestRatio ¶ added in v0.12.0
func (*Report) IsMeasuredCoverage ¶ added in v0.12.0
func (*Report) IsMeasuredTestExecutionTime ¶ added in v0.12.0
func (*Report) MeasureCodeToTestRatio ¶ added in v0.6.0
func (*Report) MeasureCoverage ¶
func (*Report) MeasureTestExecutionTime ¶ added in v0.7.0
func (*Report) TestExecutionTimeNano ¶ added in v0.29.0
func (*Report) UnmarshalJSON ¶ added in v0.51.0
Click to show internal directories.
Click to hide internal directories.