add unlisted dev setting LogNewLongRoute
This commit is contained in:
parent
16e86a9123
commit
4670375933
|
@ -63,9 +63,7 @@ func (co *DefaultPerfCounter) Tick() error {
|
||||||
high := getCounter(b.high)
|
high := getCounter(b.high)
|
||||||
avg := getCounter(b.avg)
|
avg := getCounter(b.avg)
|
||||||
c.H_counters_perf_tick_row_hook(hTbl, low, high, avg)
|
c.H_counters_perf_tick_row_hook(hTbl, low, high, avg)
|
||||||
|
if e := co.insertChunk(low, high, avg); e != nil { // TODO: Bulk insert for speed?
|
||||||
e := co.insertChunk(low, high, avg) // TODO: Bulk insert for speed?
|
|
||||||
if e != nil {
|
|
||||||
return errors.Wrap(errors.WithStack(e), "perf counter")
|
return errors.Wrap(errors.WithStack(e), "perf counter")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,6 +75,9 @@ func (co *DefaultPerfCounter) insertChunk(low, high, avg int64) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
c.DebugLogf("Inserting a pchunk with low %d, high %d, avg %d", low, high, avg)
|
c.DebugLogf("Inserting a pchunk with low %d, high %d, avg %d", low, high, avg)
|
||||||
|
if c.Dev.LogNewLongRoute && (high*1000*1000) > 5 {
|
||||||
|
c.Logf("pchunk high %d", high)
|
||||||
|
}
|
||||||
_, e := co.insert.Exec(low, high, avg)
|
_, e := co.insert.Exec(low, high, avg)
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
|
@ -84,7 +85,7 @@ func (co *DefaultPerfCounter) insertChunk(low, high, avg int64) error {
|
||||||
func (co *DefaultPerfCounter) Push(dur time.Duration /*,_ bool*/) {
|
func (co *DefaultPerfCounter) Push(dur time.Duration /*,_ bool*/) {
|
||||||
id := 0
|
id := 0
|
||||||
b := co.buckets[id]
|
b := co.buckets[id]
|
||||||
//c.DebugDetail("buckets[", id, "]: ", b)
|
//c.DebugDetail("buckets ", id, ": ", b)
|
||||||
micro := dur.Microseconds()
|
micro := dur.Microseconds()
|
||||||
if micro >= math.MaxInt32 {
|
if micro >= math.MaxInt32 {
|
||||||
c.LogWarning(errors.New("dur should not be int32 max or higher"))
|
c.LogWarning(errors.New("dur should not be int32 max or higher"))
|
||||||
|
|
|
@ -157,7 +157,8 @@ type devConfig struct {
|
||||||
//QuicPort int // Experimental!
|
//QuicPort int // Experimental!
|
||||||
|
|
||||||
//ExpFix1 bool // unlisted setting, experimental fix for http/1.1 conn hangs
|
//ExpFix1 bool // unlisted setting, experimental fix for http/1.1 conn hangs
|
||||||
LogLongTick bool // unlisted setting
|
LogLongTick bool // unlisted setting
|
||||||
|
LogNewLongRoute bool // unlisted setting
|
||||||
}
|
}
|
||||||
|
|
||||||
// configHolder is purely for having a big struct to unmarshal data into
|
// configHolder is purely for having a big struct to unmarshal data into
|
||||||
|
|
Loading…
Reference in New Issue