alemi
37fd0cda94
this is a weird one: sometimes, after sending some changes to the state worker, the GUI will completely freeze. No error or panic reported, just completely frozen, must be terminated and restarted. This is super annoying! I tried to debug it, and it seems that the main GUI thread gets blocked inside an unsafe block of crate `parking_lot` invoking a FUTEX syscall (Fast Userspace muTEX). Climbing up the stack trace, it seems to be originating from accessing a watch channel, specifically when rendering panels. I noticed that there were unnecessary borrow calls, and slimmed them down, and still haven't experienced it again. Which is weird! Seems like a very "magic" fix, but it is to be expected with race conditions, and this looks to be the case. I could quite reliably reproduce it with ~20 metrics on ~4 sources set up. idk, I just want this fixed, but I'm still super bummed I didn't catch the culprit... |
||
---|---|---|
assets | ||
migration | ||
src | ||
.editorconfig | ||
.gitignore | ||
.rustfmt.toml | ||
Cargo.toml | ||
index.html | ||
LICENSE | ||
README.md | ||
Trunk.toml |
dashboard
A data aggregating dashboard, capable of periodically fetching, parsing, archiving and plotting data.
Name
Do you have a good name idea for this project? Let me know!
How it works
This software periodically (customizable interval) makes a GET request to given URL, then applies all metric JQL queries to the JSON output, then inserts all extracted points into its underlying SQLite. Each panel displays all points gathered respecting limits, without redrawing until user interacts with UI or data changes. If no "x" query is specified, current time will be used (as timestamp) for each sample "x" coordinate, making this software especially useful for timeseries.
Usage
This program will work on a database stored in $HOME/.local/share/dashboard.db
. By default, nothing will be shown.
To add sources or panels, toggle edit mode (top left). Once in edit mode you can:
- Add panels (top bar)
- Add sources (in source sidebar, bottom)
- Edit panels (name, height, display options)
- Edit sources (name, color, query, panel) Each change is effective as soon as you type it, but won't persist a restart if you don't "save" it. Just close and reopen if you mess something up!
Features
- parse JSON apis with JQL syntax
- embedded SQLite, no need for external database
- import/export metrics data to/from CSV
- split data from 1 fetch to many metrics
- customize source color and name, toggle them (visibility or fetching)
- customize panels (size, span, offset)
- reduce data points with average or sampling
- per-source query interval
- light/dark mode
- log panel endlessly tracking errors
- tiny performance impact
Drawbacks
- Log panel has no limit, thus very long runtimes will make it slower
- Being monolithic, this project doesn't scale well with large data needs
- Untested on Windows and MacOS
- No limit on points displayed might slow down the UI, use the
reduce
feature - All fields are editable at the same time
Installation
cargo build --release
, then drop it in your ~/.local/bin
. Done, have fun hoarding data!