12 releases (7 stable)

new 2.0.0 Sep 14, 2023
1.1.1 Sep 10, 2023
1.1.0 Jun 14, 2023
0.2.3 Mar 11, 2023
0.1.0 Oct 3, 2022

#15 in #telescope

Download history 21/week @ 2023-05-30 44/week @ 2023-06-06 49/week @ 2023-06-13 43/week @ 2023-06-20 51/week @ 2023-06-27 57/week @ 2023-07-04 37/week @ 2023-07-11 31/week @ 2023-07-18 38/week @ 2023-07-25 16/week @ 2023-08-01 32/week @ 2023-08-08 32/week @ 2023-08-15 43/week @ 2023-08-22 14/week @ 2023-08-29 75/week @ 2023-09-05 61/week @ 2023-09-12

193 downloads per month
Used in 5 crates

MIT license

2MB
3K SLoC

gmt_dos-clients_arrow

Crates.io Documentation

A data logger client that uses Apache Arrow data format and Parquet data file to record time series of actor outputs.


lib.rs:

Actor client for Apache Arrow

A simulation data logger that records the data in the Apache Arrow format and automatically saves the data into a Parquet file (data.parquet) at the end of a simulation.

Example

An Arrow logger setup for 1000 time steps

use gmt_dos_clients_arrow::Arrow;
use gmt_dos_actors::prelude::*;
let logging = Arrow::builder(1000).build();

setting the name of the Parquet file


let logging = Arrow::builder(1000)
.filename("my_data.parquet")
.build();

opting out of saving the data to the Parquet file


let logging = Arrow::builder(1000)
.no_save()
.build();

Logging an output into an [Arrow] logger:

use gmt_dos_actors::prelude::*;
use gmt_dos_clients::Signals;
use gmt_dos_clients_arrow::Arrow;
use gmt_dos_clients::interface::UID;

let logging = Arrow::builder(1000).build().into_arcx();
let mut sink = Terminator::<_>::new(logging);
let mut source: Initiator<_> = Signals::new(1, 100).into();
#[derive(UID)]
enum Source {};
source.add_output().build::<Source>().logn(&mut sink, 42).await;

or if Signals implements the trait: Size<Source>

use gmt_dos_actors::prelude::*;
use gmt_dos_clients::Signals;
use gmt_dos_clients_arrow::Arrow;
use gmt_dos_clients::interface::{Size, UID};

let logging = Arrow::builder(1000).build().into_arcx();
let mut sink = Terminator::<_>::new(logging);
let mut source: Initiator<_> = Signals::new(1, 100).into();
#[derive(UID)]
enum Source {};
impl Size<Source> for Signals {
fn len(&self) -> usize {
42
}
}
source.add_output().build::<Source>().log(&mut sink).await;

Dependencies

~27–61MB
~1M SLoC