rs-tool

Crates.iors-tool
lib.rsrs-tool
version0.1.1
sourcesrc
created_at2024-08-04 19:50:57.273501
updated_at2024-08-04 19:56:35.311478
descriptionA command-line tool to perform reservoir sampling on a file or a stream
homepage
repositoryhttps://github.com/rweeks/rs-tool
max_upload_size
id1325234
size35,141
Russ Weeks (rweeks)

documentation

README

rs-tool: A Tool for Reservoir Sampling

rs-tool processes a log file or a stream of line-delimited records from stdin. It uses reservoir sampling to produce a sample of its input on a per-record or per-field basis. It prints its output to stdout in either tabular or JSON format.

Given a suitable log file, you can use rs-tool to answer questions like:

  • what are the most common IP addresses that access my web site?
  • which users use the sudo command the most?
  • what are the busiest times of day for my service?

When rs-tool reads its input from a file, it uses the Rayon parallelism library to construct and merge reservoirs in parallel.

Inspired by Tim Bray's tf.

Commit count: 0

cargo fmt