Skip to content

brewlabshq/validator-datapoints

Repository files navigation

Log Datapoint Extractor

This repository provides a Rust-based tool to efficiently parse large log files and extract unique datapoint names. The extracted datapoints are serialized into a readable JSON file.

Features

  • Efficient line-by-line processing for large log files
  • Automatic extraction of unique datapoint names
  • Serialization to a clean and readable JSON format

Requirements

  • Rust (stable release recommended)
  • Cargo (included with Rust)

Setup

  1. Clone the repository:
git clone <repo-url>
  1. Build the project:
cargo build --release

Usage

Place your log file (your_log_file.log) into the repository directory, or specify a path.

Run the tool:

cargo run --release

Output

The program generates a file named unique_datapoints.json, containing all unique datapoints extracted from the provided log file:

{
	"unique_datapoints": ["cost_tracker_stats", "tower-observed"]
}

Customizing Input and Output

To customize file names, simply edit the main.rs file:

let out_file = File::create("unique_datapoints.json")?; // Output file

Dependencies

License

This project is available under the License. See the LICENSE file for more details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages