Remove /process/:id/report/:at endpoint, extend /process/:id/report endpoint

This commit is contained in:
Ingo Oppermann
2023-03-22 12:31:41 +01:00
parent d950c45eb0
commit b21aba5f9d
8 changed files with 192 additions and 200 deletions

View File

@@ -170,7 +170,7 @@ func New(config Config) Parser {
p.collector = session.NewNullCollector()
}
p.logStart = time.Now()
p.logStart = time.Time{}
p.lock.log.Unlock()
p.ResetStats()
@@ -721,7 +721,7 @@ func (p *parser) ResetLog() {
p.lock.log.Lock()
p.log = ring.New(p.logLines)
p.logStart = time.Now()
p.logStart = time.Time{}
p.lock.log.Unlock()
}
@@ -791,6 +791,8 @@ func (p *parser) storeReportHistory(state string) {
report := p.Report()
p.ResetLog()
if len(report.Prelude) == 0 {
return
}