Skip to main content

Data logger for Disco simulations

Project description

🧾 disco-data-logger

High-performance, C++/NumPy-backed data logger
for Disco discrete-event and Monte Carlo simulation programs.

PyPI License: MIT Build Tests


Overview

disco-data-logger provides a fast, compressed, and lightweight data recording layer
for large-scale Disco simulations and other computational experiments.

It is optimized for capturing sparse numerical state updates and accumulators during simulation runs,
and writing them efficiently to disk as Zstandard-compressed segment files.
Each simulation entity or measurement can log its data independently through labeled streams.

It combines:

  • A C++/pybind11 core for high-throughput buffering and compression.
  • Python API for easy stream registration and control.
  • Built-in Parquet export for analysis and aggregation after runs.

✨ Features

  • Sparse vector logging powered by graphblas.Vector.
  • Fixed-point quantization for compact and deterministic encoding.
  • Buffered, lock-free write path (ring buffer + writer thread).
  • Zstandard compression (vendored, no external dependencies).
  • Segment rotation for large simulation outputs.
  • JSON metadata for each stream (organisation, model, experiment, …).
  • Periodic vector streams that emit state snapshots or accumulator sums once per period.
  • Integrated Parquet export for post-run analytics.
  • Arrow-based collector to filter finished loggers and emit RecordBatches directly.
  • MIT-licensed and designed for in-cluster (on-disk/in-memory) use.

🚀 Installation

pip install disco-data-logger

pyarrow ships with the package, so Parquet export works out of the box.


📚 Documentation

  • Collector – decode completed loggers, filter streams with label_selector, and write Arrow RecordBatch outputs efficiently.
  • Periodic vector stream logging – step-by-step guide for configuring periodicity, choosing between state and accumulator modes, and verifying the emitted sparse data.
  • ENGINEERING_SPEC.md – project history, motivation, and architectural overview.

🛠️ Development

Set up a virtual environment (for example, python -m venv .venv && source .venv/bin/activate), then install the project in editable mode with its development extras:

pip install -e '.[dev]'

[!NOTE] The tools namespace is provided by the separate disco-tools dependency. After installing it for the first time you must deactivate and reactivate your environment (e.g., deactivate followed by source .venv/bin/activate) so that pytest can discover the package properly.

Once the environment is ready, run the unit tests with:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

disco_data_logger-0.1.2.tar.gz (31.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

disco_data_logger-0.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

disco_data_logger-0.1.2-cp313-cp313-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

disco_data_logger-0.1.2-cp313-cp313-macosx_10_13_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

disco_data_logger-0.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

disco_data_logger-0.1.2-cp312-cp312-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

disco_data_logger-0.1.2-cp312-cp312-macosx_10_13_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

disco_data_logger-0.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

disco_data_logger-0.1.2-cp311-cp311-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

disco_data_logger-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

File details

Details for the file disco_data_logger-0.1.2.tar.gz.

File metadata

  • Download URL: disco_data_logger-0.1.2.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for disco_data_logger-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dacd9cf41ee36b3f920e2b9875ad2845ee950c0fb18ab590be46e5f40dd625fb
MD5 768f6693222ea7a43891393ab7b11844
BLAKE2b-256 55f2ad0108be6e1a83ecf6eb08d1f4969bbd7adb632ee05cdcb5785a5e416cd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.2.tar.gz:

Publisher: release-publish.yml on michielmj/disco-data-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file disco_data_logger-0.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c7f46a9eef6ab8f30e4f2fce257d641375b6405c3cdc6c21e3422169ba75fc36
MD5 ae6365ef1bf62e3ebbd3968bc3a7814e
BLAKE2b-256 8b5545e13d22f8b7e85377a30134139206c470785e34d58ddc43fb24515a1749

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file disco_data_logger-0.1.2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8fe4f6891d629c1e1aeefced7a0356782c20facbc9264138917b822577ac3a51
MD5 5b6e3a645bb39e6b1f93c9b7329184f5
BLAKE2b-256 4211c8a23351f90d617bb37afa246a4cac6ef73d6c638aab70da671cce0d493c

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.2-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file disco_data_logger-0.1.2-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.2-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 12261872cef06ae87d4767bb0d6a2135b71a7502a051e2fbf20cd62d63366ab5
MD5 5e45887ab9a5c191c9068266fcdb514d
BLAKE2b-256 f40c36e3cd1d0d105f4e2119088211fb226af376ea0795614e61d9688c15d5ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.2-cp313-cp313-macosx_10_13_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file disco_data_logger-0.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 09175e4c00ffb377ffe81f93a34f41a160fabf8ca42f57b812a36a0d0e350a2c
MD5 bd7c90ec9d6f24513b6fb32ad938273d
BLAKE2b-256 d8e19acc803c58ddf63105b60b4b497add672a9251896f711a8b13edfa73db4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file disco_data_logger-0.1.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a7d1851049d7580b7b7e6655b2475777280c07c35408fb18a7efa36fe8c17741
MD5 3166b6375444e9b1427f7c25e6958d0a
BLAKE2b-256 7bc128a33a3d14085a4c22626cf7c60e62515e5dccfe152248a6e23b1556ff4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.2-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file disco_data_logger-0.1.2-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.2-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 328d86429e703e3428c31e7289d42a89b1169a94f20bea04ea2ea14b2eb9cf96
MD5 c88773b4e5608a50c9bb82dda94b04b1
BLAKE2b-256 40f815029c68311a8802e667081b92ad5d473e13286f3f9036275d7ec4088adb

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.2-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file disco_data_logger-0.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 068c1ff04ba89ece9d8fe1599c56d4704ee8100793a0d7082702cca2a2bbdc6b
MD5 77987f6b0fd24601cf663e40c68af243
BLAKE2b-256 d0a7fdad2065008fe835719c5780b77bfea6969c30b73008a48582adbca461d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file disco_data_logger-0.1.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 698f0ac471c6a147593c9d6eaf3d9ef218b3ef6c60ce15b83b7d8b88c12789ec
MD5 5c27cd88f85eac00f000d9fa5a86c8d7
BLAKE2b-256 fdc249df5d17b4e1a28f42904bd4686cbbc57e0fd5c3f475193e61765d223184

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.2-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file disco_data_logger-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0533c7f37e7728ffec0f7ef4d44f0362f881173f60ef993381040c4b148a20f2
MD5 208280a54ccc25e4686580058e45001f
BLAKE2b-256 60edb9b0908b4ed2cdfaa4bac9b7aba9632f0158145932c113874fb00ff3cd3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page