Gerhard Bogner
11749a17fb
console: fix index 95th percentile ( #2021 )
...
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
2025-10-13 18:43:53 +02:00
Vincent Bernat
b9119a8766
console: avoid rounding errors when testing
...
Use value that don't get the risk to have a platform-dependent rounding
error (avoid .5).
2025-09-09 21:17:27 +02:00
Vincent Bernat
0992963ba5
console: do a linear interpolation to select 95th percentile
...
It is more correct than the previous value that was trying to compare
the int index to the float index. Even if the index was an int, due to
rounding issues, it is not guaranteed that the equality result was what
we expected. Instead, always use a linear interpolation.
2025-09-09 20:43:48 +02:00
Vincent Bernat
74146e428d
console: use a less hacky way to pass context to build SQL templates
...
Instead of trying to embed that in the template, provide a list of
templates with their associated input contexts and join them with UNION
ALL.
2025-09-04 07:41:08 +02:00
Vincent Bernat
e2f1df9add
tests: replace godebug by go-cmp for structure diffs
...
go-cmp is stricter and allow to catch more problems. Moreover, the
output is a bit nicer.
2025-08-23 16:03:09 +02:00
Vincent Bernat
5e826d48b1
console: fix intermittent failure when requesting previous period
...
Notably when the main table is required, but also on rare conditions
when another table would be selected because of the interval selection.
This is not perfect as sometimes, we won't have the data.
2025-07-16 20:46:35 +02:00
Fabian Bees
9f64ffc1bb
also update tests accordingly
2025-02-04 20:34:15 +01:00
Vincent Bernat
2df8b5785b
console: use avg/max for LimitType (instead of Avg/Max)
2024-11-23 23:48:02 +01:00
dimbdr
6c0e8e1791
feat: configure limit type ( #1482 )
...
* Add limit type field selection
* Take into account LimitType to generate SQL request for Line graph
Also, add LimitType in default configuration for console
* Take into account LimitType to generate SQL request for Sankey graph
* Refactor on SQL query used by line and sankey
* Add limitType description in doc
* Order by max in graphLine when limitType max is used
* Fix query when using top max
Revert some modifications, as they were no longer relevant with the query fixed.
* Rework way to sort by max in line graph type
* Add configuration validation on LimitType
---------
Co-authored-by: Dimitri Baudrier <github.52grm@simplelogin.com >
2024-11-23 18:39:28 +01:00
Vincent Bernat
41510619ff
console: fix top row selection when multiple sampling rates
2024-10-31 07:52:46 +01:00
Vincent Bernat
de65ee6072
tests: introduce helpers.Pos/helpers.Mark
...
This helps locating the position of a test.
2024-07-01 07:42:36 +02:00
Vincent Bernat
4eaaf977b7
console: API validation for /graph/table-interval
...
Also add simple HTTP tests.
2024-03-25 14:49:48 +01:00
Vincent Bernat
0792290316
build: switch mockgen to Uber fork
2024-01-14 10:41:50 +01:00
Vincent Bernat
88b27a83e6
console: fix use of aliased columns in dimensions
...
By default, `SELECT *` does not select ALIAS columns. Add the
appropriate settings to modify this.
Fix #541
2023-03-03 08:27:39 +01:00
Vincent Bernat
63267f0f5b
console: enable SrcAddr/DstAddr truncation to a fixed length
2023-02-22 20:55:21 +01:00
Vincent Bernat
609fa24a27
console: factor graphXXXHandlerInput
...
This is similar to what is done in TypeScript.
2023-02-22 20:54:58 +01:00
Vincent Bernat
e4c3a6b723
console: move /sankey and /graph to /graph/sankey and /graph/line
...
Also rename stuff to GraphSankey and GraphLine for consistency.
2023-02-22 20:54:58 +01:00