mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-10 07:11:08 +00:00
Report five-percentile rather than min
This commit is contained in:
parent
8ad0a10c61
commit
d0aef07a38
2
main.go
2
main.go
@ -209,7 +209,7 @@ func reportHandler(w http.ResponseWriter, r *http.Request) {
|
||||
func statsForInts(data []int) map[string]int {
|
||||
sort.Ints(data)
|
||||
res := make(map[string]int, 4)
|
||||
res["min"] = data[0]
|
||||
res["fp"] = data[int(float64(len(data))*0.05)]
|
||||
res["med"] = data[len(data)/2]
|
||||
res["nfp"] = data[int(float64(len(data))*0.95)]
|
||||
res["max"] = data[len(data)-1]
|
||||
|
@ -35,13 +35,13 @@ found in the LICENSE file.
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th><th class="text-right">Min</th><th class="text-right">Median</th><th class="text-right">95%</th><th class="text-right">Max</th>
|
||||
<th></th><th class="text-right">5%</th><th class="text-right">50%</th><th class="text-right">95%</th><th class="text-right">100%</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="cat in categories">
|
||||
<td>{{cat.descr}}</td>
|
||||
<td class="text-right">{{report[cat.key].min | number}} {{cat.unit}}</td>
|
||||
<td class="text-right">{{report[cat.key].fp | number}} {{cat.unit}}</td>
|
||||
<td class="text-right">{{report[cat.key].med | number}} {{cat.unit}}</td>
|
||||
<td class="text-right">{{report[cat.key].nfp | number}} {{cat.unit}}</td>
|
||||
<td class="text-right">{{report[cat.key].max | number}} {{cat.unit}}</td>
|
||||
|
Loading…
Reference in New Issue
Block a user