Skip to content

Commit 5819c81

Browse files
authored
Revert add avgRTT to nfs mountstats prometheus#487 (prometheus#625)
This is an artificiality computed value from existing values. The goal of this library is to provide simple raw access to values, rather than pre-compute data. Reverts: prometheus#487 Signed-off-by: SuperQ <[email protected]>
1 parent c5ada8d commit 5819c81

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

mountstats.go

-5
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ type NFSOperationStats struct {
194194
CumulativeTotalResponseMilliseconds uint64
195195
// Duration from when a request was enqueued to when it was completely handled.
196196
CumulativeTotalRequestMilliseconds uint64
197-
// The average time from the point the client sends RPC requests until it receives the response.
198-
AverageRTTMilliseconds float64
199197
// The count of operations that complete with tk_status < 0. These statuses usually indicate error conditions.
200198
Errors uint64
201199
}
@@ -582,9 +580,6 @@ func parseNFSOperationStats(s *bufio.Scanner) ([]NFSOperationStats, error) {
582580
CumulativeTotalResponseMilliseconds: ns[6],
583581
CumulativeTotalRequestMilliseconds: ns[7],
584582
}
585-
if ns[0] != 0 {
586-
opStats.AverageRTTMilliseconds = float64(ns[6]) / float64(ns[0])
587-
}
588583

589584
if len(ns) > 8 {
590585
opStats.Errors = ns[8]

mountstats_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ func TestMountStats(t *testing.T) {
339339
CumulativeQueueMilliseconds: 6,
340340
CumulativeTotalResponseMilliseconds: 79386,
341341
CumulativeTotalRequestMilliseconds: 79407,
342-
AverageRTTMilliseconds: 61.16024653312789,
343342
},
344343
{
345344
Operation: "WRITE",
@@ -353,7 +352,6 @@ func TestMountStats(t *testing.T) {
353352
CumulativeQueueMilliseconds: 18446743919241604546,
354353
CumulativeTotalResponseMilliseconds: 1667369447,
355354
CumulativeTotalRequestMilliseconds: 1953587717,
356-
AverageRTTMilliseconds: 0.5695744656983355,
357355
},
358356
},
359357
Transport: NFSTransportStats{
@@ -427,7 +425,6 @@ func TestMountStats(t *testing.T) {
427425
CumulativeQueueMilliseconds: 320,
428426
CumulativeTotalResponseMilliseconds: 11,
429427
CumulativeTotalRequestMilliseconds: 331,
430-
AverageRTTMilliseconds: 0.6875,
431428
Errors: 0,
432429
},
433430
},

0 commit comments

Comments
 (0)