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

Make numeric metrics display nicer (no NumberLong unless needed)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Internal Code
    • Labels:
    • Backwards Compatibility:
      Fully Compatible

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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: