2 releases
new 0.6.1 | Nov 19, 2024 |
---|---|
0.6.0 | Oct 7, 2024 |
#368 in Profiling
23 downloads per month
355KB
6.5K
SLoC
ALUMET core library
This crate contains the core of ALUMET.
It is intended to be used as a dependency of a binary crate to create a runnable measurement tool, such as app-agent
.
Plugin API
ALUMET provides a plugin API for static and dynamic plugins, written in Rust or C.
Static Rust plugins are regular libary crates, added to the dependencies of the runnable binary, alongside the alumet
library crate.
They use the public interface of the alumet
crate.
Dynamic plugins, on the other hand, do not depend on the alumet
crate, but on its exported C API (yes, this is also true for dynamic plugins written in Rust). The C ABI (Application Binary Interface) is used as a stable ABI, because the default Rust ABI is voluntarily unstable across compiler versions.
The exported C API is automatically generated with cbindgen
, and can be found in the generated/
folder.
lib.rs
:
ALUMET: Adaptive, Lightweight, Unified Metrics.
Alumet is a tool that allows you to measure things: cpu usage, energy consumption, etc.
Unlike other measurement tools, Alumet is a modular framework.
The alumet
crate enables you to create a bespoke tool with specific
probes (for example RAPL energy counters or perf profiling data),
transformation functions (such as mathematical models), and outputs (such as a timeseries database).
This crate
This crate provides the customizable measurement core.
In particular, it offers a measurement pipeline with three steps:
- Accept measurements from input sources.
- Transform the measurements.
- Write the measurements to outputs.
The pipeline is backed by asynchronous Tokio tasks. It is designed to be generic, reconfigurable and efficient. It can support a high number of sources and run them at high frequencies (e.g. above 1000 Hz). Benchmarks will be provided in the future.
Agents and plugins
Customization is made possible thanks to a plugin system. The Alumet core does not measure anything by itself. Instead, plugins provide the Sources, transform functions and outputs of the measurement pipeline.
To do something useful with Alumet, you need:
Dependencies
~9–21MB
~306K SLoC