prat

Crates.ioprat
lib.rsprat
version0.1.2
created_at2025-09-12 14:44:13.714542+00
updated_at2025-09-12 14:56:17.150943+00
descriptionPRetty PRint PRometheus cAT
homepage
repositoryhttps://github.com/blakehawkins/prat
max_upload_size
id1835892
size56,272
(blakehawkins)

documentation

README

prat

Crates.io Version

A pretty-printer for the prometheus text format

Usage

Pipe to cat/head/etc to disable pretty-printing:

$ curl https://demo.promlabs.com/metrics | prat | head
---
metrics:
  - name: go_gc_cycles_automatic_gc_cycles_total
    help: Count of completed GC cycles generated by the Go runtime. Sourced from /gc/cycles/automatic:gc-cycles.
    type: Counter
    samples:
      - labels: []
        number: 24304.0
  - name: go_gc_cycles_forced_gc_cycles_total
    help: Count of completed GC cycles forced by the application. Sourced from /gc/cycles/forced:gc-cycles.

Installation

cargo install prat
Commit count: 10

cargo fmt