func (as *Assessment) SetVerbose(verbose bool) {
	as.verbose = verbose
}
SetVerbose sets verbose level
package analytics
import (
	"math"
	"sort"
	"strings"
	"time"
)
type ScoreFormula struct {
	formula string
	label   string
	low     int
	high    int
}
var FormulaMap = map[string]ScoreFormula{
	"conns_created/s":       ScoreFormula{label: "conns_created/s", formula: "conns_created/s", low: 0, high: 5},
	"conns_current":         ScoreFormula{label: "conns_current %%", formula: "1MB*(p95 of conns_current)/RAM", low: 5, high: 20},
	"cpu_idle":              ScoreFormula{label: "cpu_idle %%", formula: "p5 of cpu_idle", low: 50, high: 80},
	"cpu_iowait":            ScoreFormula{label: "cpu_iowait %%", formula: "p95 of cpu_iowait", low: 5, high: 15},
	"cpu_system":            ScoreFormula{label: "cpu_system %%", formula: "p95 of cpu_system", low: 5, high: 15},
	"cpu_user":              ScoreFormula{label: "cpu_user %%", formula: "p95 of cpu_user", low: 50, high: 70},
	"disku_":                ScoreFormula{label: "disku_&lt;dev&gt; %%", formula: "p95 of disku_&lt;dev&gt;", low: 50, high: 90},
	"iops_":                 ScoreFormula{label: "iops_&lt;dev&gt;", formula: "(p95 of iops_&lt;dev&gt;)/(avg of iops_<dev>)", low: 2, high: 4},
	"latency_command":       ScoreFormula{label: "latency_command (ms)", formula: "p95 of latency_command", low: 20, high: 100},
	"latency_read":          ScoreFormula{label: "latency_read (ms)", formula: "p95 of latency_read", low: 20, high: 100},
	"latency_write":         ScoreFormula{label: "latency_write (ms)", formula: "p95 of latency_write", low: 20, high: 100},
	"mem_page_faults":       ScoreFormula{label: "mem_page_faults", formula: "p95 of mem_page_faults", low: 10, high: 20},
	"mem_resident":          ScoreFormula{label: "mem_resident %%", formula: "mem_resident/RAM", low: 70, high: 90},
	"ops_":                  ScoreFormula{label: "ops_&lt;op&gt;", formula: "ops_&lt;op&gt;", low: 0, high: 64000},
	"queued_read":           ScoreFormula{label: "queued_read", formula: "p95 of queued_read", low: 1, high: 5},
	"queued_write":          ScoreFormula{label: "queued_write", formula: "p95 of queued_write", low: 1, high: 5},
	"scan_keys":             ScoreFormula{label: "scan_keys", formula: "scan_keys", low: 0, high: (1024 * 1024)},
	"scan_objects":          ScoreFormula{label: "scan_objects", formula: "max of [](scan_objects/scan_keys)", low: 2, high: 5},
	"scan_sort":             ScoreFormula{label: "scan_sort", formula: "scan_sort", low: 0, high: 1000},
	"ticket_avail_read":     ScoreFormula{label: "ticket_avail_read %%", formula: "(p5 of ticket_avail_read)/128", low: 0, high: 100},
	"ticket_avail_write":    ScoreFormula{label: "ticket_avail_write %%", formula: "(p5 of ticket_avail_write)/128", low: 0, high: 100},
	"wt_cache_used":         ScoreFormula{label: "wt_cache_used %%", formula: "(p95 of wt_cache_used)/wt_cache_max", low: 80, high: 95},
	"wt_cache_dirty":        ScoreFormula{label: "wt_cache_dirty %%", formula: "(p95 of wt_cache_dirty)/wt_cache_max", low: 5, high: 20},
	"wt_dhandles_active":    ScoreFormula{label: "wt_dhandles_active", formula: "(p95 of wt_dhandles_active)", low: 16000, high: 20000},
	"wt_modified_evicted":   ScoreFormula{label: "wt_modified_evicted  %%", formula: "(p95 of wt_modified_evicted)/(pages of wt_cache_max)", low: 5, high: 10},
	"wt_unmodified_evicted": ScoreFormula{label: "wt_unmodified_evicted  %%", formula: "(p95 of wt_unmodified_evicted)/(pages of wt_cache_max)", low: 5, high: 10},
}
type Assessment struct {
	blocks        int
	maxCachePages int
	stats         FTDCStats
	verbose       bool
}
type metricStats struct {
	label  string
	median float64
	p5     float64
	p95    float64
	score  int
}
func NewAssessment(stats FTDCStats) *Assessment {
	assessment := Assessment{blocks: 3, stats: stats}
	cores := stats.ServerInfo.HostInfo.System.NumCores
	m := FormulaMap["queued_read"]
	m.low = cores
	m.high = 5 * cores
	FormulaMap["queued_read"] = m
	m = FormulaMap["queued_write"]
	m.low = cores
	m.high = 5 * cores
	FormulaMap["queued_write"] = m
	assessment.maxCachePages = int(.05 * float64(stats.MaxWTCache) * (1024 * 1024 * 1024) / (4 * 1024))  
	return &assessment
}