update thrift, opencensus, others (#893)

* update thrift, opencensus, others

* stats: update to opencensus 0.6.0 view api
This commit is contained in:
Reed Allman
2018-03-26 15:43:49 -07:00
committed by GitHub
parent 0ce5c4500b
commit 8af605cf3d
1266 changed files with 122191 additions and 28775 deletions

View File

@@ -46,6 +46,10 @@ func (r *Router) WithPrefix(prefix string) *Router {
// handle turns a HandlerFunc into an httprouter.Handle.
func (r *Router) handle(handlerName string, h http.HandlerFunc) httprouter.Handle {
if r.instrh != nil {
// This needs to be outside the closure to avoid data race when reading and writing to 'h'.
h = r.instrh(handlerName, h)
}
return func(w http.ResponseWriter, req *http.Request, params httprouter.Params) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -53,9 +57,6 @@ func (r *Router) handle(handlerName string, h http.HandlerFunc) httprouter.Handl
for _, p := range params {
ctx = context.WithValue(ctx, param(p.Key), p.Value)
}
if r.instrh != nil {
h = r.instrh(handlerName, h)
}
h(w, req.WithContext(ctx))
}
}

View File

@@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// Package nfsd implements parsing of /proc/net/rpc/nfsd.
// Package nfs implements parsing of /proc/net/rpc/nfsd.
// Fields are documented in https://www.svennd.be/nfsd-stats-explained-procnetrpcnfsd/
package nfs
@@ -136,8 +136,8 @@ type ClientV4Stats struct {
Setattr uint64
FsInfo uint64
Renew uint64
SetClientId uint64
SetClientIdConfirm uint64
SetClientID uint64
SetClientIDConfirm uint64
Lock uint64
Lockt uint64
Locku uint64
@@ -156,13 +156,13 @@ type ClientV4Stats struct {
ReadDir uint64
ServerCaps uint64
DelegReturn uint64
GetAcl uint64
SetAcl uint64
GetACL uint64
SetACL uint64
FsLocations uint64
ReleaseLockowner uint64
Secinfo uint64
FsidPresent uint64
ExchangeId uint64
ExchangeID uint64
CreateSession uint64
DestroySession uint64
Sequence uint64
@@ -173,11 +173,11 @@ type ClientV4Stats struct {
LayoutCommit uint64
LayoutReturn uint64
SecinfoNoName uint64
TestStateId uint64
FreeStateId uint64
TestStateID uint64
FreeStateID uint64
GetDeviceList uint64
BindConnToSession uint64
DestroyClientId uint64
DestroyClientID uint64
Seek uint64
Allocate uint64
DeAllocate uint64
@@ -238,7 +238,7 @@ type V4Ops struct {
RelLockOwner uint64
}
// RPCStats models all stats from /proc/net/rpc/nfs.
// ClientRPCStats models all stats from /proc/net/rpc/nfs.
type ClientRPCStats struct {
Network Network
ClientRPC ClientRPC

View File

@@ -204,8 +204,8 @@ func parseClientV4Stats(v []uint64) (ClientV4Stats, error) {
Setattr: v[10],
FsInfo: v[11],
Renew: v[12],
SetClientId: v[13],
SetClientIdConfirm: v[14],
SetClientID: v[13],
SetClientIDConfirm: v[14],
Lock: v[15],
Lockt: v[16],
Locku: v[17],
@@ -224,13 +224,13 @@ func parseClientV4Stats(v []uint64) (ClientV4Stats, error) {
ReadDir: v[30],
ServerCaps: v[31],
DelegReturn: v[32],
GetAcl: v[33],
SetAcl: v[34],
GetACL: v[33],
SetACL: v[34],
FsLocations: v[35],
ReleaseLockowner: v[36],
Secinfo: v[37],
FsidPresent: v[38],
ExchangeId: v[39],
ExchangeID: v[39],
CreateSession: v[40],
DestroySession: v[41],
Sequence: v[42],
@@ -241,11 +241,11 @@ func parseClientV4Stats(v []uint64) (ClientV4Stats, error) {
LayoutCommit: v[47],
LayoutReturn: v[48],
SecinfoNoName: v[49],
TestStateId: v[50],
FreeStateId: v[51],
TestStateID: v[50],
FreeStateID: v[51],
GetDeviceList: v[52],
BindConnToSession: v[53],
DestroyClientId: v[54],
DestroyClientID: v[54],
Seek: v[55],
Allocate: v[56],
DeAllocate: v[57],

View File

@@ -108,8 +108,8 @@ proc4 48 98 51 54 83 85 23 24 1 28 73 68 83 12 84 39 68 59 58 88 29 74 69 96 21
Setattr: 73,
FsInfo: 68,
Renew: 83,
SetClientId: 12,
SetClientIdConfirm: 84,
SetClientID: 12,
SetClientIDConfirm: 84,
Lock: 39,
Lockt: 68,
Locku: 59,
@@ -128,13 +128,13 @@ proc4 48 98 51 54 83 85 23 24 1 28 73 68 83 12 84 39 68 59 58 88 29 74 69 96 21
ReadDir: 66,
ServerCaps: 56,
DelegReturn: 97,
GetAcl: 36,
SetAcl: 49,
GetACL: 36,
SetACL: 49,
FsLocations: 32,
ReleaseLockowner: 85,
Secinfo: 81,
FsidPresent: 11,
ExchangeId: 58,
ExchangeID: 58,
CreateSession: 32,
DestroySession: 67,
Sequence: 13,
@@ -145,11 +145,11 @@ proc4 48 98 51 54 83 85 23 24 1 28 73 68 83 12 84 39 68 59 58 88 29 74 69 96 21
LayoutCommit: 26,
LayoutReturn: 1337,
SecinfoNoName: 0,
TestStateId: 0,
FreeStateId: 0,
TestStateID: 0,
FreeStateID: 0,
GetDeviceList: 0,
BindConnToSession: 0,
DestroyClientId: 0,
DestroyClientID: 0,
Seek: 0,
Allocate: 0,
DeAllocate: 0,
@@ -234,8 +234,8 @@ proc4 61 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Setattr: 0,
FsInfo: 0,
Renew: 0,
SetClientId: 1,
SetClientIdConfirm: 1,
SetClientID: 1,
SetClientIDConfirm: 1,
Lock: 0,
Lockt: 0,
Locku: 0,
@@ -254,13 +254,13 @@ proc4 61 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ReadDir: 0,
ServerCaps: 0,
DelegReturn: 0,
GetAcl: 0,
SetAcl: 0,
GetACL: 0,
SetACL: 0,
FsLocations: 0,
ReleaseLockowner: 0,
Secinfo: 0,
FsidPresent: 0,
ExchangeId: 0,
ExchangeID: 0,
CreateSession: 0,
DestroySession: 0,
Sequence: 0,
@@ -271,11 +271,11 @@ proc4 61 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
LayoutCommit: 0,
LayoutReturn: 0,
SecinfoNoName: 0,
TestStateId: 0,
FreeStateId: 0,
TestStateID: 0,
FreeStateID: 0,
GetDeviceList: 0,
BindConnToSession: 0,
DestroyClientId: 0,
DestroyClientID: 0,
Seek: 0,
Allocate: 0,
DeAllocate: 0,