From 7141f972700ed454438d8539dd0bec79c0b61cf4 Mon Sep 17 00:00:00 2001 From: Sebastian Jug Date: Tue, 16 Oct 2018 16:30:53 -0400 Subject: OpenTracing support added to start, stop, run, create, pull, and ps Drop context.Context field from cli.Context Signed-off-by: Sebastian Jug --- vendor/github.com/uber/jaeger-lib/metrics/timer.go | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 vendor/github.com/uber/jaeger-lib/metrics/timer.go (limited to 'vendor/github.com/uber/jaeger-lib/metrics/timer.go') diff --git a/vendor/github.com/uber/jaeger-lib/metrics/timer.go b/vendor/github.com/uber/jaeger-lib/metrics/timer.go new file mode 100644 index 000000000..e18d222ab --- /dev/null +++ b/vendor/github.com/uber/jaeger-lib/metrics/timer.go @@ -0,0 +1,33 @@ +// Copyright (c) 2017 Uber Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package metrics + +import ( + "time" +) + +// Timer accumulates observations about how long some operation took, +// and also maintains a historgam of percentiles. +type Timer interface { + // Records the time passed in. + Record(time.Duration) +} + +// NullTimer timer that does nothing +var NullTimer Timer = nullTimer{} + +type nullTimer struct{} + +func (nullTimer) Record(time.Duration) {} -- cgit v1.2.3-54-g00ecf