Skip to content

Commit

Permalink
レポートのポーリングに中央値を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
twsnmp committed Mar 14, 2023
1 parent 94a53fd commit 4ac7e0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions polling/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func doPollingReport(pe *datastore.PollingEnt) {
pe.Result["max"], _ = stats.Max(scores)
pe.Result["mean"], _ = stats.Mean(scores)
pe.Result["mode"], _ = stats.Mode(scores)
pe.Result["median"], _ = stats.Median(scores)
pe.Result["stddev"], _ = stats.StandardDeviation(scores)
for k, v := range pe.Result {
if v == math.NaN() {
Expand All @@ -82,6 +83,7 @@ func doPollingReport(pe *datastore.PollingEnt) {
vm.Set("min", pe.Result["min"])
vm.Set("mean", pe.Result["mean"])
vm.Set("mode", pe.Result["mode"])
vm.Set("median", pe.Result["median"])
vm.Set("stddev", pe.Result["stddev"])
value, err := vm.Run(script)
if err != nil {
Expand Down

0 comments on commit 4ac7e0d

Please sign in to comment.