Merge pull request #83828 from SataQiu/cleanup-component-base-20191012

Clean up for component-base/metrics
This commit is contained in:
Kubernetes Prow Robot 2019-10-16 09:33:56 -07:00 committed by GitHub
commit 75390f5d91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 34 additions and 16 deletions

View File

@ -18,10 +18,12 @@ package metrics
import (
"bytes"
"testing"
"github.com/blang/semver"
"github.com/prometheus/common/expfmt"
apimachineryversion "k8s.io/apimachinery/pkg/version"
"testing"
)
func TestCounter(t *testing.T) {

View File

@ -17,9 +17,11 @@ limitations under the License.
package metrics
import (
"github.com/blang/semver"
apimachineryversion "k8s.io/apimachinery/pkg/version"
"testing"
"github.com/blang/semver"
apimachineryversion "k8s.io/apimachinery/pkg/version"
)
func TestGauge(t *testing.T) {

View File

@ -17,10 +17,12 @@ limitations under the License.
package metrics
import (
"testing"
"github.com/blang/semver"
"github.com/prometheus/client_golang/prometheus"
apimachineryversion "k8s.io/apimachinery/pkg/version"
"testing"
)
func TestHistogram(t *testing.T) {

View File

@ -17,10 +17,12 @@ limitations under the License.
package legacyregistry
import (
"net/http"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"k8s.io/component-base/metrics"
"net/http"
)
var (

View File

@ -17,11 +17,13 @@ limitations under the License.
package metrics
import (
"sync"
"github.com/blang/semver"
"github.com/prometheus/client_golang/prometheus"
dto "github.com/prometheus/client_model/go"
"k8s.io/klog"
"sync"
)
/*

View File

@ -18,9 +18,10 @@ package metrics
import (
"fmt"
"github.com/prometheus/client_golang/prometheus"
"sync"
"time"
"github.com/prometheus/client_golang/prometheus"
)
// KubeOpts is superset struct for prometheus.Opts. The prometheus Opts structure

View File

@ -17,11 +17,13 @@ limitations under the License.
package metrics
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs"
"k8s.io/klog"
"os"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs"
"k8s.io/klog"
)
var processStartTime = prometheus.NewGaugeVec(

View File

@ -22,6 +22,7 @@ import (
"github.com/blang/semver"
"github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/assert"
apimachineryversion "k8s.io/apimachinery/pkg/version"
)

View File

@ -17,9 +17,11 @@ limitations under the License.
package metrics
import (
"github.com/blang/semver"
apimachineryversion "k8s.io/apimachinery/pkg/version"
"testing"
"github.com/blang/semver"
apimachineryversion "k8s.io/apimachinery/pkg/version"
)
func TestSummary(t *testing.T) {

View File

@ -18,9 +18,11 @@ package metrics
import (
"fmt"
"github.com/blang/semver"
apimachineryversion "k8s.io/apimachinery/pkg/version"
"regexp"
"github.com/blang/semver"
apimachineryversion "k8s.io/apimachinery/pkg/version"
)
const (

View File

@ -17,8 +17,9 @@ limitations under the License.
package metrics
import (
apimachineryversion "k8s.io/apimachinery/pkg/version"
"testing"
apimachineryversion "k8s.io/apimachinery/pkg/version"
)
func TestVersionParsing(t *testing.T) {

View File

@ -18,7 +18,6 @@ package metrics
import (
"github.com/prometheus/client_golang/prometheus"
dto "github.com/prometheus/client_model/go"
)