Commit Graph

24 Commits

Author SHA1 Message Date
Gerhard Bogner
11749a17fb 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
* fix index 95th percentile

* go fmt, update expected 95th percentile test results
2025-10-13 18:43:53 +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
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
Vincent Bernat
a48ee19567 console: do not compare time directly
It should be fine because they are from the same source (ClickHouse).
But better safe than sorry.
2025-07-14 19:37:07 +02:00
Vincent Bernat
13965fa84a console: fix misleading comment when padding dimensions 2025-07-13 13:35:01 +02:00
Vincent Bernat
fb3f5f976b common: use slices from standard library instead of x/exp/slices 2025-06-15 13:58:30 +02:00
Fabian Bees
708889d558 feat/console: option to sort by last column 2025-02-21 10:03:30 +01:00
Fabian Bees
c656e1cd30 feat/console: DataTable show last value 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
a449736a62 build: use Go 1.22 range over ints
Done with:

```
git grep -l 'for.*:= 0.*++' \
  | xargs sed -i -E 's/for (.*) := 0; \1 < (.*); \1\+\+/for \1 := range \2/'
```

And a few manual fixes due to unused variables. There is something fishy
in BMP rib test. Add a comment about that. This is not equivalent (as
with range, random is evaluated once, while in the original loop, it is
evaluated at each iteration). I believe the intent was to behave like
with range.
2024-08-14 10:11:35 +02:00
Vincent Bernat
0239cd0a9f common: remove MarshalJSON helpers for mapstructure
They are not needed anymore since we don't exchange configuration files
using JSON, since baac495b9c.
2024-07-20 14:51:40 +02:00
netixx
a312bc307e Use unit for sorting topX instead of always using bytes 2024-07-16 21:58:54 +02:00
Vincent Bernat
625429f27f orchestrator/clickhouse: add compatibility check for INTERPOLATE issue
I don't want to keep disabling the experimental analyzer forever. The
version check could be turned into disabling the experimental analyzer,
but this is better to push people to update their versions.

To be pushed only when 24.3 (LTS) and 24.4 gets the fix.
2024-06-14 22:15:43 +02:00
Vincent Bernat
a8da1eeebf console: document issue with ClickHouse experimental analyzer 2024-06-02 13:55:36 +02:00
Vincent Bernat
889f82eb85 common/clickhousedb: disable experimental analyzer, only when using FILL 2024-04-19 19:51:44 +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
b5cc995557 console/query: SrcVlan/DstVlan as a dimension
Make the code more generic for IPv6 types and UInt types to
format them correctly.

Fix #623
2023-04-12 21:03:04 +02:00
Vincent Bernat
33a0a17fcb console: log SQL query on error 2023-02-25 10:51:13 +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