swarm/network: measure time of messages in priority queue (#19250)
This commit is contained in:
committed by
GitHub
parent
c53c5e616f
commit
baded64d88
2
vendor/github.com/opentracing/opentracing-go/CHANGELOG.md
generated
vendored
2
vendor/github.com/opentracing/opentracing-go/CHANGELOG.md
generated
vendored
@ -10,5 +10,5 @@ Changes by Version
|
||||
1.0.0 (2016-09-26)
|
||||
-------------------
|
||||
|
||||
- This release implements OpenTracing Specification 1.0 (http://opentracing.io/spec)
|
||||
- This release implements OpenTracing Specification 1.0 (https://opentracing.io/spec)
|
||||
|
||||
|
18
vendor/github.com/opentracing/opentracing-go/Makefile
generated
vendored
18
vendor/github.com/opentracing/opentracing-go/Makefile
generated
vendored
@ -1,26 +1,15 @@
|
||||
PACKAGES := . ./mocktracer/... ./ext/...
|
||||
|
||||
.DEFAULT_GOAL := test-and-lint
|
||||
|
||||
.PHONE: test-and-lint
|
||||
|
||||
.PHONY: test-and-lint
|
||||
test-and-lint: test lint
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
go test -v -cover -race ./...
|
||||
|
||||
.PHONY: cover
|
||||
cover:
|
||||
@rm -rf cover-all.out
|
||||
$(foreach pkg, $(PACKAGES), $(MAKE) cover-pkg PKG=$(pkg) || true;)
|
||||
@grep mode: cover.out > coverage.out
|
||||
@cat cover-all.out >> coverage.out
|
||||
go tool cover -html=coverage.out -o cover.html
|
||||
@rm -rf cover.out cover-all.out coverage.out
|
||||
|
||||
cover-pkg:
|
||||
go test -coverprofile cover.out $(PKG)
|
||||
@grep -v mode: cover.out >> cover-all.out
|
||||
go test -v -coverprofile=coverage.txt -covermode=atomic -race ./...
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
@ -29,4 +18,3 @@ lint:
|
||||
@# Run again with magic to exit non-zero if golint outputs anything.
|
||||
@! (golint ./... | read dummy)
|
||||
go vet ./...
|
||||
|
||||
|
4
vendor/github.com/opentracing/opentracing-go/README.md
generated
vendored
4
vendor/github.com/opentracing/opentracing-go/README.md
generated
vendored
@ -8,8 +8,8 @@ This package is a Go platform API for OpenTracing.
|
||||
## Required Reading
|
||||
|
||||
In order to understand the Go platform API, one must first be familiar with the
|
||||
[OpenTracing project](http://opentracing.io) and
|
||||
[terminology](http://opentracing.io/documentation/pages/spec.html) more specifically.
|
||||
[OpenTracing project](https://opentracing.io) and
|
||||
[terminology](https://opentracing.io/specification/) more specifically.
|
||||
|
||||
## API overview for those adding instrumentation
|
||||
|
||||
|
18
vendor/github.com/opentracing/opentracing-go/globaltracer.go
generated
vendored
18
vendor/github.com/opentracing/opentracing-go/globaltracer.go
generated
vendored
@ -1,7 +1,12 @@
|
||||
package opentracing
|
||||
|
||||
type registeredTracer struct {
|
||||
tracer Tracer
|
||||
isRegistered bool
|
||||
}
|
||||
|
||||
var (
|
||||
globalTracer Tracer = NoopTracer{}
|
||||
globalTracer = registeredTracer{NoopTracer{}, false}
|
||||
)
|
||||
|
||||
// SetGlobalTracer sets the [singleton] opentracing.Tracer returned by
|
||||
@ -11,22 +16,27 @@ var (
|
||||
// Prior to calling `SetGlobalTracer`, any Spans started via the `StartSpan`
|
||||
// (etc) globals are noops.
|
||||
func SetGlobalTracer(tracer Tracer) {
|
||||
globalTracer = tracer
|
||||
globalTracer = registeredTracer{tracer, true}
|
||||
}
|
||||
|
||||
// GlobalTracer returns the global singleton `Tracer` implementation.
|
||||
// Before `SetGlobalTracer()` is called, the `GlobalTracer()` is a noop
|
||||
// implementation that drops all data handed to it.
|
||||
func GlobalTracer() Tracer {
|
||||
return globalTracer
|
||||
return globalTracer.tracer
|
||||
}
|
||||
|
||||
// StartSpan defers to `Tracer.StartSpan`. See `GlobalTracer()`.
|
||||
func StartSpan(operationName string, opts ...StartSpanOption) Span {
|
||||
return globalTracer.StartSpan(operationName, opts...)
|
||||
return globalTracer.tracer.StartSpan(operationName, opts...)
|
||||
}
|
||||
|
||||
// InitGlobalTracer is deprecated. Please use SetGlobalTracer.
|
||||
func InitGlobalTracer(tracer Tracer) {
|
||||
SetGlobalTracer(tracer)
|
||||
}
|
||||
|
||||
// IsGlobalTracerRegistered returns a `bool` to indicate if a tracer has been globally registered
|
||||
func IsGlobalTracerRegistered() bool {
|
||||
return globalTracer.isRegistered
|
||||
}
|
||||
|
2
vendor/github.com/opentracing/opentracing-go/propagation.go
generated
vendored
2
vendor/github.com/opentracing/opentracing-go/propagation.go
generated
vendored
@ -160,7 +160,7 @@ type HTTPHeadersCarrier http.Header
|
||||
// Set conforms to the TextMapWriter interface.
|
||||
func (c HTTPHeadersCarrier) Set(key, val string) {
|
||||
h := http.Header(c)
|
||||
h.Add(key, val)
|
||||
h.Set(key, val)
|
||||
}
|
||||
|
||||
// ForeachKey conforms to the TextMapReader interface.
|
||||
|
Reference in New Issue
Block a user