Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Support new-line delimited (NDJSON) export

Aperta
#448 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
40/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, json
Ambito
cli

Direzione di ricerca

The payload names no files, so begin by reading how sadf parses its output-format option and how the existing JSON output is produced, then trace where the document is opened and closed. The goal is a new format that writes one JSON object per line so Polars or jq -c can stream it, which also gives the acceptance test: compare the NDJSON output against the current --format=json output for the same sar file and confirm both parse to the same records. Expect to touch option parsing, the printer, and the man page, so budget reading time before editing.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I have a workflow where I capture data adhoc with sar and convert it to JSON with sadf, then Parquet using Polars. In some cases I end up with a really large amounts of data (2+ GiB). Polars supports reading/streaming NDJSON data efficiently, whereas it has to load a regular JSON object entirely into memory.

I have been converting the file returned from sadf to NDJSON using jq, but when the input file is that large jq either uses 10+ GiB of memory or takes 10+ mins to run when using --stream.

It would be helpful if sadf could emit NDJSON directly.

Lingua principale
C
Stelle
3.4k
Fork
490
Merge medio
3g 14h
PR unite (30g)
5

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sysstat/sysstat

Tutte le issue di sysstat/sysstat

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.