Kolbold
Kolbold is a Rust library designed to measure time and memory complexity for code execution. It provides tools for gathering system metrics such as CPU and memory usage, making it ideal for performance analysis in both single-threaded and multi-threaded environments.
Features
- Time Complexity Measurement: Collects CPU usage and execution time in synchronous and asynchronous contexts.
- Memory Complexity Measurement: Measures memory usage during code execution.
- Thread-Specific Metrics: Captures detailed metrics for individual threads in multi-threaded scenarios.
- Easy Integration: Simple API for adding performance measurement to your Rust code.
Table of Contents
Installation
To use kolbold, add the following line to your Cargo.toml:
[]
= "1.0.5"
Then, include it in your code:
use TimeComplexity;
use MemoryComplexity;
Usage
Time Complexity
Measure time complexity for a synchronous, single-threaded function:
use ;
use Result;
Measure time complexity for an asynchronous, single-threaded function:
use ;
use Result;
use main;
async
Memory Complexity
Measure memory usage for a synchronous function:
use ;
use Result;
Documentation
For detailed API documentation and examples, refer to the full documentation.
Contributing
Contributions are welcome! If you want to contribute to the project, please check out the Contributing guidelines for more information.
License
This project is licensed under the MIT License. See the Apache 2.0 License file for details.
Contact
For any inquiries or further information, feel free to reach out:
- Author: Nikola Kolev
- Email: nikolakolev712@gmail.com