mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Set the Window duration which each report covers
This is used by the multi-tenant code.
This commit is contained in:
@@ -236,6 +236,7 @@ ForLoop:
|
||||
|
||||
func (p *Probe) publishLoop() {
|
||||
defer p.done.Done()
|
||||
startTime := mtime.Now()
|
||||
pubTick := time.Tick(p.publishInterval)
|
||||
publishCount := 0
|
||||
var lastFullReport report.Report
|
||||
@@ -249,6 +250,8 @@ func (p *Probe) publishLoop() {
|
||||
if !fullReport {
|
||||
rpt.UnsafeUnMerge(lastFullReport)
|
||||
}
|
||||
rpt.Window = mtime.Now().Sub(startTime)
|
||||
startTime = mtime.Now()
|
||||
err = p.publisher.Publish(rpt)
|
||||
if err == nil {
|
||||
if fullReport {
|
||||
|
||||
Reference in New Issue
Block a user