Windows Performance Counters written in Rust
This all started as a simple university assignment on building a custom Windows performance counters object provider written in C++. Guess what? Not it's in Rust. And it's not merely a simple counter, but a framework for building them.
This is an umbrella project for libs and tools used to build Windows performance counters provider and consumer which exchange text data through Morse code additionally encoded with custom protocol for robustness and synchronization.
Cargo workspace includes the following sub-projects (highest to lowest importance):
Target | Path | Description |
---|---|---|
example-provide-morse-counter | examples.d/provide-morse-counter | Compile and install and register dll which provides "Morse code" performance counters object. |
example-consume-morse-counter | examples.d/consume-morse-counter | Terminal user interface (TUI) for consumer of "Morse code" performance counters object. |
win-high | win-high/ | High-level safe bindings and wrappers for the winapi. |
win-low | win-low/ | Low-level bindings for winapi which are missing from the winapi crate. |
signal-flow | signal-flow/ | Tx/Rx abstractions and common useful implementations. Provides blocking senders and receivers. |
morse-stream | morse-stream/ | Streaming encoder and decoder of Morse code. Supports ITU dialect with most of punctuation included. |
rtsm-proto | rtsm-proto/ | Ratijas Slow-Mode protocol, designed to prevent synchronization problems, built on top of signal-flow primitives. |
Several examples are contained in a separate project. This is done to facilitate dependency management of the examples.
To install provider and test it with consumer:
> cargo build --package example-provide-morse-counter
scripts/install.bat
.
install.bat
, 'Run as Administrator'.examples.d\provide-morse-counter\scripts\install.bat
from theHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Morse
.> cargo run --bin example-consume-morse-counter
WITHOUT administratorSOS in Performance Monitor
Custom message
Message of the day in Performance Monitor
Random joke about CHUCK NORRIS
RegEdit.exe settings