mirror of
https://github.com/JakeHillion/scx.git
synced 2024-12-02 13:57:11 +00:00
03495cd37b
scx_stat is a statistics reporting library with the following goals: - Minimal boilerplate code. Statistics are defined as a regular rust struct which can contain integers, floats, strings, structs, and array or BTreeMap of them. The struct and each field can be annotated using the "stat" attribute. The "Stat" derive macro generates the necessary metadata. - On-demand reporting. ScxStatServer implements a UNIX domain socket server which communicates using a simple json protocol. Stat structs can be added to the server with closures to output them. There can be any number of readers. ScxStatServer can be queried for the metadata of all stat structs that it may report so that a generic tool can be written to pipe the reported statistics to other frameworks (e.g. openmetrics). - The interface protocol is pretty simple and it isn't difficult to interact directly in json. ScxStatClient is provided to further simplify client implementation. - See rust/scx_stat/examples/{server,client}.rs for usage.
8 lines
320 B
Meson
8 lines
320 B
Meson
custom_target('scx_stat',
|
|
output: '@PLAINNAME@.__PHONY__',
|
|
input: 'Cargo.toml',
|
|
command: [cargo, 'build', '--manifest-path=@INPUT@', '--target-dir=@OUTDIR@',
|
|
'--all', cargo_build_args],
|
|
env: cargo_env,
|
|
build_by_default: true)
|