Skip to content

Commit

Permalink
client request metrics should be registered only once
Browse files Browse the repository at this point in the history
  • Loading branch information
hongchaodeng committed Nov 27, 2015
1 parent a506030 commit 0521481
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/client/unversioned/request.go
Expand Up @@ -48,6 +48,10 @@ import (
// are therefore not allowed to set manually.
var specialParams = sets.NewString("timeout")

func init() {
metrics.Register()
}

// HTTPClient is an interface for testing a request object.
type HTTPClient interface {
Do(req *http.Request) (*http.Response, error)
Expand Down Expand Up @@ -109,7 +113,6 @@ type Request struct {
// NewRequest creates a new request helper object for accessing runtime.Objects on a server.
func NewRequest(client HTTPClient, verb string, baseURL *url.URL, apiVersion string,
codec runtime.Codec) *Request {
metrics.Register()
return &Request{
client: client,
verb: verb,
Expand Down

1 comment on commit 0521481

@k8s-teamcity-mesosphere

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 7080 outcome was SUCCESS
Summary: Tests passed: 1, ignored: 203 Build time: 00:10:11

Please sign in to comment.