Documentation ¶
Index ¶
- Constants
- type AddonMetadata
- type Metadata
- func (m *Metadata) ClearHealthcheckValue(key string)
- func (m *Metadata) IncrementBeforeSuiteMetric(metric string, value int)
- func (m *Metadata) IncrementHealthcheckIteration()
- func (m *Metadata) IncrementLogMetric(metric string, value int)
- func (m *Metadata) ResetBeforeSuiteMetrics()
- func (m *Metadata) ResetLogMetrics()
- func (m *Metadata) SetClusterID(id string)
- func (m *Metadata) SetClusterName(name string)
- func (m *Metadata) SetClusterVersion(version string)
- func (m *Metadata) SetEnvironment(env string)
- func (m *Metadata) SetHealthcheckValue(key string, value []string)
- func (m *Metadata) SetPassRate(currentPhase string, passRate float64)
- func (m *Metadata) SetRegion(region string)
- func (m *Metadata) SetReportDir(reportDir string)
- func (m *Metadata) SetRouteAvailability(route string, availability float64)
- func (m *Metadata) SetRouteLatency(route string, latency float64)
- func (m *Metadata) SetRouteThroughput(route string, throughput float64)
- func (m *Metadata) SetStatus(status string)
- func (m *Metadata) SetTimeToCertificateIssued(timeToCertificateIssued float64)
- func (m *Metadata) SetTimeToClusterReady(timeToClusterReady float64)
- func (m *Metadata) SetTimeToOCMReportingInstalled(timeToOCMReportingInstalled float64)
- func (m *Metadata) SetTimeToUpgradedCluster(timeToUpgradedCluster float64)
- func (m *Metadata) SetTimeToUpgradedClusterReady(timeToUpgradedClusterReady float64)
- func (m *Metadata) SetUpgradeVersion(ver string)
- func (m *Metadata) SetUpgradeVersionSource(src string)
- func (m *Metadata) WriteToJSON(reportDir string) (err error)
- func (m *Metadata) ZeroHealthcheckIteration()
Constants ¶
const ( // CustomMetadataFile is the name of the custom metadata file generated for spyglass visualization. CustomMetadataFile string = "custom-prow-metadata.json" // MetadataFile is the name of the custom metadata file generated for spyglass visualization. MetadataFile string = "metadata.json" // TestHarnessMetadataFile is name of the test harness metadata file TestHarnessMetadataFile string = "test-harness-metadata.json" // AddonMetadataFile is created by some addons during execution AddonMetadataFile string = "addon-metadata.json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddonMetadata ¶
type AddonMetadata struct { // Whether the CRD was found. Typically Spyglass seems to have issues displaying non-strings, so // this will be written out as a string despite the native JSON boolean type. Version string `json:"version,string"` ID string `json:"id,string"` }
addonMetadata houses metadata to be written out to the additional-metadata.json
func (*AddonMetadata) SetID ¶
func (m *AddonMetadata) SetID(id string)
func (*AddonMetadata) SetVersion ¶
func (m *AddonMetadata) SetVersion(version string)
func (*AddonMetadata) WriteToJSONFile ¶
func (m *AddonMetadata) WriteToJSONFile(outputFilename string) (err error)
WriteToJSON will marshall the addon metadata struct and write it into the given file.
type Metadata ¶
type Metadata struct { // Cluster information ClusterID string `json:"cluster-id"` ClusterName string `json:"cluster-name"` ClusterVersion string `json:"cluster-version"` Environment string `json:"environment"` Region string `json:"region"` UpgradeVersion string `json:"upgrade-version,omitempty"` UpgradeVersionSource string `json:"upgrade-version-source,omitempty"` // Metrics TimeToOCMReportingInstalled float64 `json:"time-to-ocm-reporting-installed,string"` TimeToClusterReady float64 `json:"time-to-cluster-ready,string"` TimeToUpgradedCluster float64 `json:"time-to-upgraded-cluster,string"` TimeToUpgradedClusterReady float64 `json:"time-to-upgraded-cluster-ready,string"` TimeToCertificateIssued float64 `json:"time-to-certificate-issued,string"` InstallPhasePassRate float64 `json:"install-phase-pass-rate,string"` UpgradePhasePassRate float64 `json:"upgrade-phase-pass-rate,string"` LogMetrics map[string]int `json:"log-metrics"` BeforeSuiteMetrics map[string]int `json:"before-suite-metrics"` RouteLatencies map[string]float64 `json:"route-latencies"` RouteThroughputs map[string]float64 `json:"route-throughputs"` RouteAvailabilities map[string]float64 `json:"route-availabilities"` // Real Time Data HealthChecks map[string][]string `json:"healthchecks"` HealthCheckIteration float64 `json:"healthcheckIteration"` Status string `json:"status"` // Internal variables ReportDir string `json:"-"` }
Metadata houses the metadata that will be written to the report directory after
var Instance *Metadata
Instance is the global metadata instance
func (*Metadata) ClearHealthcheckValue ¶
ClearHealthcheckValue removes a pending healthcheck
func (*Metadata) IncrementBeforeSuiteMetric ¶
IncrementBeforeSuiteMetric adds a supplied number to a before suite metric or sets the metric to the value if it doesn't exist already
func (*Metadata) IncrementHealthcheckIteration ¶
func (m *Metadata) IncrementHealthcheckIteration()
IncrementHealthcheckIteration increments the healthcheck counter
func (*Metadata) IncrementLogMetric ¶
IncrementLogMetric adds a supplied number to a log metric or sets the metric to the value if it doesn't exist already
func (*Metadata) ResetBeforeSuiteMetrics ¶
func (m *Metadata) ResetBeforeSuiteMetrics()
ResetBeforeSuiteMetrics zeroes out old results to be used before a new run.
func (*Metadata) ResetLogMetrics ¶
func (m *Metadata) ResetLogMetrics()
ResetLogMetrics zeroes out old results to be used before a new run.
func (*Metadata) SetClusterID ¶
SetClusterID sets the cluster id
func (*Metadata) SetClusterName ¶
SetClusterName sets the cluster name
func (*Metadata) SetClusterVersion ¶
SetClusterVersion sets the cluster version
func (*Metadata) SetEnvironment ¶
SetEnvironment sets the cluster environment
func (*Metadata) SetHealthcheckValue ¶
SetHealthcheckValue sets an arbitrary string value to a healthcheck
func (*Metadata) SetPassRate ¶
SetPassRate sets the passrate metadata metric for the given phase
func (*Metadata) SetReportDir ¶
SetReportDir sets the report dir for the metadata.
func (*Metadata) SetRouteAvailability ¶
SetRouteAvailability sets the availability for the given route (ratio of successful requests)
func (*Metadata) SetRouteLatency ¶
SetRouteLatency sets the mean latency for the given route (measured in milliseconds)
func (*Metadata) SetRouteThroughput ¶
SetRouteThroughput sets the throughput for the given route (rate of successful requests per second)
func (*Metadata) SetTimeToCertificateIssued ¶
SetTimeToCertificateIssued sets the time it took for a certificate to be issued to the cluster
func (*Metadata) SetTimeToClusterReady ¶
SetTimeToClusterReady sets the time it took for the cluster to appear healthy on install
func (*Metadata) SetTimeToOCMReportingInstalled ¶
SetTimeToOCMReportingInstalled sets the time it took for OCM to report a cluster provisioned
func (*Metadata) SetTimeToUpgradedCluster ¶
SetTimeToUpgradedCluster sets the time it took for the cluster to install an upgrade
func (*Metadata) SetTimeToUpgradedClusterReady ¶
SetTimeToUpgradedClusterReady sets the time it took for the cluster to appear healthy on upgrade
func (*Metadata) SetUpgradeVersion ¶
SetUpgradeVersion sets the cluster upgrade version
func (*Metadata) SetUpgradeVersionSource ¶
SetUpgradeVersionSource sets the cluster upgrade version source
func (*Metadata) WriteToJSON ¶
WriteToJSON will marshall the metadata struct and write it into the given file.
func (*Metadata) ZeroHealthcheckIteration ¶
func (m *Metadata) ZeroHealthcheckIteration()
ZeroHealthcheckIteration zeroes out the healthcheck counter