Add Async option for Thresholds

This commit is contained in:
TeoV
2017-10-11 17:01:23 +03:00
committed by Dan Christian Bogos
parent ec5adbe93f
commit 4f4ba6ed73
7 changed files with 85 additions and 24 deletions

View File

@@ -2106,7 +2106,7 @@ func (tpr *TpReader) WriteToDatabase(flush, verbose, disable_reverse bool) (err
}
}
if verbose {
log.Print("Filters:")
log.Print("FilterProfile:")
}
for _, mpID := range tpr.flProfiles {
for _, tpTH := range mpID {
@@ -2122,6 +2122,17 @@ func (tpr *TpReader) WriteToDatabase(flush, verbose, disable_reverse bool) (err
}
}
}
if verbose {
log.Print("Filters:")
}
for _, thd := range tpr.filters {
if err = tpr.dataStorage.SetFilter(&Filter{Tenant: thd.Tenant, ID: thd.ID}); err != nil {
return err
}
if verbose {
log.Print("\t", thd.TenantID())
}
}
if verbose {
log.Print("Timings:")
}
@@ -2297,7 +2308,7 @@ func (tpr *TpReader) ShowStatistics() {
log.Print("Stats: ", len(tpr.sqProfiles))
// thresholds
log.Print("Thresholds: ", len(tpr.thProfiles))
// thresholds
// filters
log.Print("Filters: ", len(tpr.flProfiles))
}