Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expand serde coverage for histogram crate #107

Merged
merged 3 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion histogram/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "histogram"
version = "0.9.0"
version = "0.9.1"
edition = "2021"
authors = ["Brian Martin <brian@pelikan.io>"]
license = "MIT OR Apache-2.0"
Expand Down
1 change: 1 addition & 0 deletions histogram/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::time::SystemTime;

/// A snapshot of a histogram across a time range.
#[derive(Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Snapshot {
// note: `Histogram` contains the start time
pub(crate) end: SystemTime,
Expand Down
5 changes: 1 addition & 4 deletions histogram/src/sparse.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

use crate::{Bucket, Config, Error, Histogram, Snapshot};

/// This histogram is a sparse, columnar representation of the regular
Expand All @@ -10,7 +7,7 @@ use crate::{Bucket, Config, Error, Histogram, Snapshot};
/// of non-zero buckets. Assuming index[0] = n, (index[0], count[0])
/// corresponds to the nth bucket.
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct SparseHistogram {
/// parameters representing the resolution and the range of
Expand Down
1 change: 1 addition & 0 deletions histogram/src/standard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::time::SystemTime;

/// A histogram that uses plain 64bit counters for each bucket.
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Histogram {
pub(crate) config: Config,
pub(crate) start: SystemTime,
Expand Down
4 changes: 2 additions & 2 deletions metriken/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "metriken"
version = "0.5.1"
version = "0.5.2"
brayniac marked this conversation as resolved.
Show resolved Hide resolved
edition = "2021"
authors = [
"Brian Martin <brian@iop.systems>",
Expand All @@ -14,7 +14,7 @@ repository = "https://github.com/pelikan-io/rustcommon"
[dependencies]
metriken-core = { version = "0.1", path = "core" }
metriken-derive = { version = "=0.5.1", path = "./derive" }
histogram = { version = "0.9.0", path = "../histogram" }
histogram = { version = "0.9.1", path = "../histogram" }

once_cell = "1.14.0"
parking_lot = "0.12.1"
Expand Down
4 changes: 2 additions & 2 deletions ringlog/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ringlog"
version = "0.5.0"
version = "0.6.0"
edition = "2021"
license = "Apache-2.0"
authors = ["Brian Martin <brian@pelikan.io>"]
Expand All @@ -11,6 +11,6 @@ repository = "https://github.com/pelikan-io/rustcommon"
[dependencies]
ahash = "0.8.0"
clocksource = { version = "0.8.0", path = "../clocksource" }
metriken = { version = "0.4.0" }
metriken = { version = "0.5.2", path = "../metriken" }
log = { version = "0.4.17", features = ["std"] }
mpmc = "0.1.6"
Loading