Documentation ¶
Index ¶
- Constants
- Variables
- func GetRunId() string
- func InitProfileStat(h GetProfileCSVHeader, c GetProfileCSV)
- func PrettyPrint()
- func SetNumWorker(_w int)
- func SetRunId(_id string)
- func SetSilent(s bool)
- type DbStats
- type GetProfileCSV
- type GetProfileCSVHeader
- type MongoStats
- type ProfileStats
- type Response
- type ServerStatus
- type Shard
- type ShardChunk
- type Stats
Constants ¶
View Source
const STAT_BATCH_SIZE uint64 = 1 // batch 20 at one time before submit
Variables ¶
View Source
var AllStats []Stats
View Source
var IN_WARMUP bool
Functions ¶
func InitProfileStat ¶
func InitProfileStat(h GetProfileCSVHeader, c GetProfileCSV)
func PrettyPrint ¶
func PrettyPrint()
func SetNumWorker ¶
func SetNumWorker(_w int)
Types ¶
type GetProfileCSV ¶
type GetProfileCSVHeader ¶
type GetProfileCSVHeader func() string // to return current profile's header for CSV
type MongoStats ¶
type MongoStats struct {
// contains filtered or unexported fields
}
var HammerMongoStats MongoStats
func (*MongoStats) CsvHeader ¶
func (m *MongoStats) CsvHeader() string
func (*MongoStats) InitMongo_Monitor ¶
func (m *MongoStats) InitMongo_Monitor(_server string, _dial_info mgo.DialInfo)
func (*MongoStats) MonitorMongo ¶
func (m *MongoStats) MonitorMongo() (string, string)
type ProfileStats ¶
type ProfileStats struct { Name string // profile stats shall have a name, which shall be title for csv & print // contains filtered or unexported fields }
func (*ProfileStats) GetAvg ¶
func (p *ProfileStats) GetAvg(total_time float64) float64
func (*ProfileStats) GetLastIntervalReq ¶
func (p *ProfileStats) GetLastIntervalReq() int64
func (*ProfileStats) GetThroughput ¶
func (p *ProfileStats) GetThroughput(total_time float64) float64
func (*ProfileStats) RecordResponse ¶
func (p *ProfileStats) RecordResponse(t int64)
type ServerStatus ¶
type ServerStatus struct { // "uptimeMillis" : NumberLong(701103909), Uptime int64 UptimeMillis int64 `bson:"uptimeMillis"` /* "connections" : { "current" : 4, "available" : 2044, "totalCreated" : NumberLong(6128) }, */ Connections map[string]int /* "cursors" : { "totalOpen" : 0, "clientCursors_size" : 0, "timedOut" : 39 }, */ Cursors map[string]int /* "opcounters" : { "insert" : 137499268, "query" : 2664989, "update" : 31827171, "delete" : 0, "getmore" : 596, "command" : 107359317 }, */ Opcounters map[string]int /* "mem" : { "bits" : 64, "resident" : 4278, "virtual" : 36037, "supported" : true, "mapped" : 16729, "mappedWithJournal" : 33458 }, */ Mem map[string]int /* "extra_info" : { "note" : "fields vary by platform", "page_faults" : 4034466 }, */ Extra_info map[string]int /* "globalLock" : { "totalTime" : NumberLong("692055293000"), "lockTime" : NumberLong(1523335985), "currentQueue" : { "total" : 0, "readers" : 0, "writers" : 0 }, "activeClients" : { "total" : 0, "readers" : 0, "writers" : 0 } }, */ GlobalLock map[string]map[string]int `bson:"globalLock"` /* "backgroundFlushing" : { "flushes" : 7825, "total_ms" : 1295781, "average_ms" : 165.59501597444088, "last_ms" : 12017, "last_finished" : ISODate("2014-01-23T19:43:59.507Z") }, */ BackgroundFlushing map[string]int `bson:"backgroundFlushing"` /* "indexCounters" : { "accesses" : 543179283, "hits" : 543179119, "misses" : 0, "resets" : 0, "missRatio" : 0 }, */ IndexCounters map[string]int /* "locks" : { "." : { <-- global lock "timeLockedMicros" : { "R" : NumberLong(58871490), "W" : NumberLong(1344716751) }, "timeAcquiringMicros" : { "R" : NumberLong(142669463), "W" : NumberLong(3293543) } }, .... "test1" : { <-- per DB lock "timeLockedMicros" : { "r" : NumberLong(239821), "w" : NumberLong(73567) }, "timeAcquiringMicros" : { "r" : NumberLong(81857), "w" : NumberLong(7573) } }, */ Locks map[string]map[string]map[string]int64 Host string }
struct to hold serverStatus, this may not be ideal way to do this, TODO
type ShardChunk ¶
type Stats ¶
type Stats struct { C_response chan uint64 C_send chan uint64 // contains filtered or unexported fields }
Stats will be an atomic, to count the number of request handled
var HammerStats Stats
func (*Stats) RecordError ¶
func (*Stats) RecordSend ¶
func (*Stats) StartMonitoring ¶
Click to show internal directories.
Click to hide internal directories.