mirror of
https://github.com/lightninglabs/faraday.git
synced 2026-08-20 13:28:33 +02:00
dataset: add more logging
This commit is contained in:
parent
86e0795fc2
commit
acde3549a8
1 changed files with 8 additions and 1 deletions
|
|
@ -180,7 +180,8 @@ func (d Dataset) GetOutliers(outlierMultiplier float64) (
|
|||
// we cannot calculate outliers so we return a map with all false
|
||||
// outlier results.
|
||||
if err == errTooFewValues {
|
||||
log.Info(err)
|
||||
log.Debug("could not calculate quartiles: %v, returning an "+
|
||||
"empty set of outliers", err)
|
||||
|
||||
// Return a map with no outliers.
|
||||
for label := range d {
|
||||
|
|
@ -195,6 +196,9 @@ func (d Dataset) GetOutliers(outlierMultiplier float64) (
|
|||
return nil, err
|
||||
}
|
||||
|
||||
log.Tracef("quartiles calculated for: %v items: upper quartile: %v, "+
|
||||
"lower quartile: %v", len(d), upper, lower)
|
||||
|
||||
// If we could could calculate quartiles for the dataset, we get
|
||||
// outliers and populate a result map.
|
||||
for label, value := range d {
|
||||
|
|
@ -212,6 +216,9 @@ func (d Dataset) GetOutliers(outlierMultiplier float64) (
|
|||
func (d Dataset) GetThreshold(thresholdValue float64, below bool) map[string]bool {
|
||||
threshold := make(map[string]bool, len(d.rawValues()))
|
||||
|
||||
log.Tracef("examining %v items with threshold: %v, looking "+
|
||||
"for <= threshold: %v", len(d), thresholdValue, below)
|
||||
|
||||
for label, value := range d {
|
||||
// If we are looking for values below the threshold, check the
|
||||
// current value then move on to the next one.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue