func (st *ServerStats) SetPeekingMode(peek bool) {
	st.peek = peek
	if st.peek {
		st.freq.serverStatus = 1
		st.freq.replset = 5
	}
}
SetPeekingMode sets peeking mode
package sim
import (
	"bytes"
	"encoding/json"
	"fmt"
	"log"
	"sort"
	"strconv"
	"strings"
	"time"
	"github.com/simagix/gox"
	anly "github.com/simagix/keyhole/analytics"
	"github.com/simagix/keyhole/mdb"
	"go.mongodb.org/mongo-driver/bson"
	"go.mongodb.org/mongo-driver/mongo"
	"go.mongodb.org/mongo-driver/x/mongo/driver/connstring"
)
var fileTimestamp = strings.Replace(time.Now().Format(time.RFC3339)[:19], ":", "", -1)
var keyholeStatsDataFile = "./keyhole_stats." + fileTimestamp
var mb = 1024.0 * 1024
var serverInfoDocs = map[string]anly.ServerInfoDoc{}
var serverStatusDocs = map[string][]anly.ServerStatusDoc{}
var replSetStatusDocs = map[string][]anly.ReplSetStatusDoc{}
func getServerInfoDocs(key string) anly.ServerInfoDoc         { return serverInfoDocs[key] }
func getServerStatusDocs(key string) []anly.ServerStatusDoc   { return serverStatusDocs[key] }
func getReplSetStatusDocs(key string) []anly.ReplSetStatusDoc { return replSetStatusDocs[key] }
type Frequency struct {
	replset      int
	serverStatus int
}
type ServerStats struct {
	channel chan string
	mkey    string
	peek    bool
	freq    Frequency
	uri     string
	verbose bool
}
func NewServerStats(uri string, channel chan string) *ServerStats {
	freq := Frequency{serverStatus: 5, replset: 10}
	return &ServerStats{channel: channel, uri: uri, mkey: getReplicaSetName(uri), freq: freq}
}
func (st *ServerStats) SetVerbose(verbose bool) { st.verbose = verbose }