New fingeprint method

This commit is contained in:
Carlos Salguero
2017-02-16 15:59:01 -03:00
parent 28a1870de9
commit 1d6adb953d
6 changed files with 260 additions and 36 deletions

View File

@@ -27,12 +27,18 @@ import (
const (
TOOLNAME = "pt-mongodb-summary"
DEFAULT_AUTHDB = "admin"
DEFAULT_HOST = "localhost:27017"
DEFAULT_LOGLEVEL = "warn"
DEFAULT_RUNNINGOPSINTERVAL = 1000 // milliseconds
DEFAULT_RUNNINGOPSSAMPLES = 5
)
var (
Version string = "2.2.19"
Build string = "01-01-1980"
GoVersion string = "1.8"
Version string = "3.0.1"
)
type TimedStats struct {
@@ -779,10 +785,11 @@ func externalIP() (string, error) {
func parseFlags() options {
opts := options{
Host: "localhost:27017",
LogLevel: "warn",
RunningOpsSamples: 5,
RunningOpsInterval: 1000, // milliseconds
Host: DEFAULT_HOST,
LogLevel: DEFAULT_LOGLEVEL,
RunningOpsSamples: DEFAULT_RUNNINGOPSSAMPLES,
RunningOpsInterval: DEFAULT_RUNNINGOPSINTERVAL, // milliseconds
AuthDB: DEFAULT_AUTHDB,
}
getopt.BoolVarLong(&opts.Help, "help", 'h', "Show help")

View File

@@ -10,8 +10,8 @@ Unsharded Collections: {{.UnshardedColsCount}}
Unsharded Data Size: {{.UnshardedDataSizeScaled}} {{.UnshardedDataSizeScale}}
{{- if .Chunks }}
### Chunks:
{{- range .Chunks }}
{{ printf "%30s" .ID}}: {{ printf "%5d" .Count }}
{{ range .Chunks }}
{{- if .ID }} {{ printf "%5d" .Count }} : {{ printf "%-30s" .ID}}{{ end -}}
{{- end -}}
{{ end -}}
`