[SERVER-8350] Make numeric metrics display nicer (no NumberLong unless needed) Created: 26/Jan/13  Updated: 24/Mar/17  Resolved: 24/Mar/17

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Scott Hernandez (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: metrics
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

All these number longs would go away in the display.

"document" : {
	"deleted" : NumberLong(0),
	"inserted" : NumberLong(1),
	"returned" : NumberLong(0),
	"scanned" : NumberLong(0),
	"updated" : NumberLong(0)
},
"getLastError" : {
	"wtime" : {
		"num" : 0,
		"totalMillis" : 0
	},
	"wtimeouts" : NumberLong(0)
},
"operation" : {
	"fastmod" : NumberLong(0),
	"idhack" : NumberLong(0),
	"scanAndOrder" : NumberLong(0)
},
"record" : {
	"moves" : NumberLong(10001)
},
"repl" : {
	"apply" : {
		"batches" : {
			"num" : 20,
			"totalMillis" : 779
		},
		"ops" : NumberLong(20000)
	},
	"buffer" : {
		"count" : NumberLong(0),
		"maxSizeBytes" : NumberLong(268435456),
		"sizeBytes" : NumberLong(0)
	},
	"network" : {
		"bytes" : NumberLong(2388828),
		"getmores" : {
			"num" : 10523,
			"totalMillis" : 1874
		},
		"ops" : NumberLong(20000),
		"readersCreated" : NumberLong(3)
	},
	"preload" : {
		"docs" : {
			"num" : 10000,
			"totalMillis" : 0
		},
		"indexes" : {
			"num" : 19999,
			"totalMillis" : 0
		}
	}
},
"ttl" : {
	"deletedDocuments" : NumberLong(0),
	"passes" : NumberLong(0)
}

Add template for ServerStatusMetricNumericField to use appendNumber. Change all current uses to this (documents., repl.*,...).

(There are arguments against this like the fact that the type changes as the size increases (int32->int64) but we already do this elsewhere and it is much nicer in js without NumberLong...)



 Comments   
Comment by Ian Whalen (Inactive) [ 24/Mar/17 ]

Can't fix this because one of the requirements here is round-tripping through the shell.

Generated at Thu Feb 08 03:17:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.