8 Commits

Author SHA1 Message Date
Harald Eilertsen
52a2a0d89a Pass loadavg as array from Perfstats
There's no reason we should format the data into a string in the
Perfstats module. Let the recipient do what they want with it instead.

As an example, we reduce the precision of the loadavg stats in the
system status widget. 3 digits precision should be more than enough for
this type of status display.

Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
2026-03-01 11:34:28 +01:00
Harald Eilertsen
91944da69e Report queries/sec in system status widget
The total number of queries is not that interesting for performance
measurements, so let's do queries pr/second instead. Adds a timestamp
column to the dataset, which could be useful for other purposes as well
(like making a graph over time etc.)

Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
2026-03-01 11:16:05 +01:00
Harald Eilertsen
78e30a4d32 Simplify stats for getting size of output queue
Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
2026-02-26 16:28:59 +01:00
Harald Eilertsen
ccd6d1a38c Move db stats to separate classes for each db type
Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
2026-02-26 16:19:17 +01:00
Harald Eilertsen
db5e92b72d Remove unused/incomplete function
Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
2026-02-23 21:34:04 +01:00
Harald Eilertsen
3d3580b23f Validate requests to perfstats
Make some stricter rules for accessing the perfstats module. We only
want to respond to GET request for json data made by a site admin.

This means we also need to pass along the credentials in the request.
Didn't immediately figure out how to do that using `z_fetch_url`, so we
just fall back to using the JavaScript to populate the widget. This
makes it idle for about 5 sec before it gets the first data sample.

I think that's probably OK.

Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
2026-02-23 21:21:09 +01:00
Harald Eilertsen
283b606c09 Update system status activity widget periodically
Adds a bit of javascript that requests the performance stats every 5
seconds.

Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
2026-02-23 21:21:09 +01:00
Harald Eilertsen
b0b5523f2b Add perfstat module
Moves collecting performance statistics for the system status activity
widget to a separate module. This will make it easier to get the data
from JavaScript or external monitoring tools.

Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
2026-02-23 21:21:09 +01:00