mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-07 21:09:14 +00:00
restore TimeoutChan
This commit is contained in:
@@ -18,6 +18,7 @@ var (
|
||||
type Profiler interface {
|
||||
GetLastError() error
|
||||
QueriesChan() chan stats.Queries
|
||||
TimeoutsChan() <-chan time.Time
|
||||
FlushQueries()
|
||||
Start()
|
||||
Stop()
|
||||
@@ -93,6 +94,15 @@ func (p *Profile) Stop() {
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Profile) TimeoutsChan() <-chan time.Time {
|
||||
p.lock.Lock()
|
||||
defer p.lock.Unlock()
|
||||
if p.timeoutsChan == nil {
|
||||
p.timeoutsChan = make(chan time.Time)
|
||||
}
|
||||
return p.timeoutsChan
|
||||
}
|
||||
|
||||
func (p *Profile) getData() {
|
||||
go p.getDocs()
|
||||
p.stopWaitGroup.Add(1)
|
||||
|
Reference in New Issue
Block a user