mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-12 06:24:10 +01:00
console: fix index 95th percentile (#2021)
Some checks failed
CI / 🤖 Check dependabot status (push) Has been cancelled
CI / 🐧 Test on Linux (${{ github.ref_type == 'tag' }}, misc) (push) Has been cancelled
CI / 🐧 Test on Linux (coverage) (push) Has been cancelled
CI / 🐧 Test on Linux (regular) (push) Has been cancelled
CI / ❄️ Build on Nix (push) Has been cancelled
CI / 🍏 Build and test on macOS (push) Has been cancelled
CI / 🧪 End-to-end testing (push) Has been cancelled
CI / 🔍 Upload code coverage (push) Has been cancelled
CI / 🔬 Test only Go (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 20) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 22) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 24) (push) Has been cancelled
CI / ⚖️ Check licenses (push) Has been cancelled
CI / 🐋 Build Docker images (push) Has been cancelled
CI / 🐋 Tag Docker images (push) Has been cancelled
CI / 🚀 Publish release (push) Has been cancelled
Update Nix dependency hashes / Update dependency hashes (push) Has been cancelled
Some checks failed
CI / 🤖 Check dependabot status (push) Has been cancelled
CI / 🐧 Test on Linux (${{ github.ref_type == 'tag' }}, misc) (push) Has been cancelled
CI / 🐧 Test on Linux (coverage) (push) Has been cancelled
CI / 🐧 Test on Linux (regular) (push) Has been cancelled
CI / ❄️ Build on Nix (push) Has been cancelled
CI / 🍏 Build and test on macOS (push) Has been cancelled
CI / 🧪 End-to-end testing (push) Has been cancelled
CI / 🔍 Upload code coverage (push) Has been cancelled
CI / 🔬 Test only Go (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 20) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 22) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 24) (push) Has been cancelled
CI / ⚖️ Check licenses (push) Has been cancelled
CI / 🐋 Build Docker images (push) Has been cancelled
CI / 🐋 Tag Docker images (push) Has been cancelled
CI / 🚀 Publish release (push) Has been cancelled
Update Nix dependency hashes / Update dependency hashes (push) Has been cancelled
* fix index 95th percentile * go fmt, update expected 95th percentile test results
This commit is contained in:
@@ -427,7 +427,7 @@ func (c *Component) graphLineHandlerFunc(gc *gin.Context) {
|
|||||||
// Max
|
// Max
|
||||||
output.Max[i] = points[nbPoints-1]
|
output.Max[i] = points[nbPoints-1]
|
||||||
// 95th percentile with linear interpolation
|
// 95th percentile with linear interpolation
|
||||||
index := 0.95*float64(nbPoints) - 1
|
index := 0.95 * float64(nbPoints-1)
|
||||||
j := int(index)
|
j := int(index)
|
||||||
fraction := index - float64(j)
|
fraction := index - float64(j)
|
||||||
output.NinetyFivePercentile[i] = points[nbPoints-1]
|
output.NinetyFivePercentile[i] = points[nbPoints-1]
|
||||||
|
|||||||
@@ -1002,12 +1002,12 @@ func TestGraphLineHandler(t *testing.T) {
|
|||||||
700,
|
700,
|
||||||
},
|
},
|
||||||
"95th": []int{
|
"95th": []int{
|
||||||
4700,
|
4800,
|
||||||
925,
|
950,
|
||||||
1020,
|
1080,
|
||||||
935,
|
990,
|
||||||
780,
|
820,
|
||||||
1630,
|
1720,
|
||||||
},
|
},
|
||||||
"axis": []int{
|
"axis": []int{
|
||||||
1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1,
|
||||||
@@ -1128,19 +1128,19 @@ func TestGraphLineHandler(t *testing.T) {
|
|||||||
70,
|
70,
|
||||||
},
|
},
|
||||||
"95th": []int{
|
"95th": []int{
|
||||||
4700,
|
4800,
|
||||||
925,
|
950,
|
||||||
1020,
|
1080,
|
||||||
935,
|
990,
|
||||||
780,
|
820,
|
||||||
1630,
|
1720,
|
||||||
|
|
||||||
470,
|
480,
|
||||||
93,
|
96,
|
||||||
102,
|
108,
|
||||||
94,
|
100,
|
||||||
78,
|
82,
|
||||||
163,
|
172,
|
||||||
},
|
},
|
||||||
"axis": []int{
|
"axis": []int{
|
||||||
1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1,
|
||||||
@@ -1228,13 +1228,13 @@ func TestGraphLineHandler(t *testing.T) {
|
|||||||
6166,
|
6166,
|
||||||
},
|
},
|
||||||
"95th": []int{
|
"95th": []int{
|
||||||
4700,
|
4800,
|
||||||
925,
|
950,
|
||||||
1020,
|
1080,
|
||||||
935,
|
990,
|
||||||
780,
|
820,
|
||||||
1630,
|
1720,
|
||||||
7700,
|
7800,
|
||||||
},
|
},
|
||||||
"axis": []int{
|
"axis": []int{
|
||||||
1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1,
|
||||||
@@ -1424,12 +1424,12 @@ func TestGraphLineHandler(t *testing.T) {
|
|||||||
700,
|
700,
|
||||||
},
|
},
|
||||||
"95th": []int{
|
"95th": []int{
|
||||||
4700,
|
4800,
|
||||||
1020,
|
1080,
|
||||||
935,
|
990,
|
||||||
925,
|
950,
|
||||||
780,
|
820,
|
||||||
1630,
|
1720,
|
||||||
},
|
},
|
||||||
"axis": []int{
|
"axis": []int{
|
||||||
1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1,
|
||||||
@@ -1550,19 +1550,19 @@ func TestGraphLineHandler(t *testing.T) {
|
|||||||
70,
|
70,
|
||||||
},
|
},
|
||||||
"95th": []int{
|
"95th": []int{
|
||||||
4700,
|
4800,
|
||||||
1020,
|
1080,
|
||||||
935,
|
990,
|
||||||
925,
|
950,
|
||||||
780,
|
820,
|
||||||
1630,
|
1720,
|
||||||
|
|
||||||
470,
|
480,
|
||||||
102,
|
108,
|
||||||
94,
|
100,
|
||||||
93,
|
96,
|
||||||
78,
|
82,
|
||||||
163,
|
172,
|
||||||
},
|
},
|
||||||
"axis": []int{
|
"axis": []int{
|
||||||
1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1,
|
||||||
@@ -1650,13 +1650,13 @@ func TestGraphLineHandler(t *testing.T) {
|
|||||||
6166,
|
6166,
|
||||||
},
|
},
|
||||||
"95th": []int{
|
"95th": []int{
|
||||||
4700,
|
4800,
|
||||||
1020,
|
1080,
|
||||||
935,
|
990,
|
||||||
925,
|
950,
|
||||||
780,
|
820,
|
||||||
1630,
|
1720,
|
||||||
7700,
|
7800,
|
||||||
},
|
},
|
||||||
"axis": []int{
|
"axis": []int{
|
||||||
1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user