Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8350

Make numeric metrics display nicer (no NumberLong unless needed)

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Fully Compatible

      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...)

            Assignee:
            Unassigned Unassigned
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: