mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-24 07:28:27 +00:00
Forgot 5% for floats
This commit is contained in:
parent
d71a782179
commit
ec85c9fdfe
2
main.go
2
main.go
@ -235,7 +235,7 @@ func statsForInts(data []int) map[string]int {
|
|||||||
func statsForFloats(data []float64) map[string]float64 {
|
func statsForFloats(data []float64) map[string]float64 {
|
||||||
sort.Float64s(data)
|
sort.Float64s(data)
|
||||||
res := make(map[string]float64, 4)
|
res := make(map[string]float64, 4)
|
||||||
res["min"] = data[0]
|
res["fp"] = data[int(float64(len(data))*0.05)]
|
||||||
res["med"] = data[len(data)/2]
|
res["med"] = data[len(data)/2]
|
||||||
res["nfp"] = data[int(float64(len(data))*0.95)]
|
res["nfp"] = data[int(float64(len(data))*0.95)]
|
||||||
res["max"] = data[len(data)-1]
|
res["max"] = data[len(data)-1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user