#energy #monitoring #performance-monitoring #rapl

alumet

Modular framework for hardware and software measurement (including energy consumption and more)

1 unstable release

0.6.0 Oct 7, 2024

#136 in Profiling

Download history 173/week @ 2024-10-06 23/week @ 2024-10-13 2/week @ 2024-10-20

198 downloads per month

EUPL-1.2

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:

  1. Accept measurements from input sources.
  2. Transform the measurements.
  3. 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:

  • A runnable application, the agent. See the documentation of the agent module.
  • A set of plugins, which implement the measurement and export operations. Learn how to make plugins by reading the documentation of the plugin module.

Dependencies

~9–21MB
~308K SLoC