prow/jenkins/jenkins.go
func (c *Client) measure(method, path string, code int, start time.Time) {
	if c.metrics == nil {
		return
	}
	c.metrics.RequestLatency.WithLabelValues(method, path).Observe(time.Since(start).Seconds())
	c.metrics.Requests.WithLabelValues(method, path, fmt.Sprintf("%d", code)).Inc()
}
func (c *Client) measure(method, path string, code int, start time.Time) {
	if c.metrics == nil {
		return
	}
	c.metrics.RequestLatency.WithLabelValues(method, path).Observe(time.Since(start).Seconds())
	c.metrics.Requests.WithLabelValues(method, path, fmt.Sprintf("%d", code)).Inc()
}
func ( c * Client ) measure ( method , path string , code int , start time . Time ) { if c . metrics == nil { return } c . metrics . RequestLatency . WithLabelValues ( method , path ) . Observe ( time . Since ( start ) . Seconds ( ) ) c . metrics . Requests . WithLabelValues ( method , path , fmt . Sprintf ( " " , code ) ) . Inc ( ) }
// measure records metrics about the provided method, path, and code.
// start needs to be recorded before doing the request.
measure records metrics about the provided method path and code . start needs to be recorded before doing the request .