This repository contains sample code for calculating DNS Magnitude from PCAPs.
Data is stored as CBOR encoded HLLs using the Apache Datasketches HLL implementation.
uv run pcap2hlls --labels 1 --top 1000 --output hll1.cbor test1.pcap
uv run pcap2hlls --labels 1 --top 1000 --output hll2.cbor test2.pcap
uv run merge_magnitude_hlls --output merged.cbor hll*.cbor
uv run hlls2magnitude --output report.json merged.cbor