Skip to content

Commit

Permalink
histogram: rename serde feature (#95)
Browse files Browse the repository at this point in the history
Renames the serde feature to better match conventions.

Version-locks metriken-derive.
  • Loading branch information
brayniac authored Jan 16, 2024
1 parent 08dfc84 commit 5b22527
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions histogram/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "histogram"
version = "0.8.4"
version = "0.9.0"
edition = "2021"
authors = ["Brian Martin <brian@pelikan.io>"]
license = "MIT OR Apache-2.0"
Expand All @@ -18,8 +18,8 @@ criterion = "0.5.1"
rand = "0.8.5"

[features]
schemars = ["dep:schemars", "serde-serialize"]
serde-serialize = ["serde"]
schemars = ["dep:schemars", "serde"]
serde = ["dep:serde"]

[[bench]]
name = "histogram"
Expand Down
4 changes: 2 additions & 2 deletions histogram/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::Error;
use core::ops::RangeInclusive;

#[cfg(feature = "serde-serialize")]
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

/// The configuration of a histogram which determines the bucketing strategy and
Expand Down Expand Up @@ -56,7 +56,7 @@ use serde::{Deserialize, Serialize};
/// * `max_value_power` must be in the range `0..=64`
/// * `max_value_power` must be greater than `grouping_power
#[derive(Clone, Copy, Debug, PartialEq)]
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct Config {
max: u64,
Expand Down
4 changes: 2 additions & 2 deletions histogram/src/sparse.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[cfg(feature = "serde-serialize")]
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

use crate::{Bucket, Config, Error, Histogram, Snapshot};
Expand All @@ -10,7 +10,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-serialize", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct SparseHistogram {
/// parameters representing the resolution and the range of
Expand Down
6 changes: 3 additions & 3 deletions metriken/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "metriken"
version = "0.3.3"
version = "0.4.0"
edition = "2021"
authors = [
"Brian Martin <brian@iop.systems>",
Expand All @@ -16,8 +16,8 @@ repository = "https://github.com/pelikan-io/rustcommon"
links = "metriken"

[dependencies]
metriken-derive = { version = "0.2.0", path = "./derive" }
histogram = { version = "0.8.3", path = "../histogram" }
metriken-derive = { version = "=0.4.0", path = "./derive" }
histogram = { version = "0.9.0", path = "../histogram" }

linkme = "0.3.3"
once_cell = "1.14.0"
Expand Down
2 changes: 1 addition & 1 deletion metriken/derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "metriken-derive"
version = "0.2.0"
version = "0.4.0"
edition = "2021"
authors = [
"Brian Martin <brian@pelikan.io>",
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.4.0"
version = "0.5.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.3.3", path = "../metriken" }
metriken = { version = "0.4.0", path = "../metriken" }
log = { version = "0.4.17", features = ["std"] }
mpmc = "0.1.6"

0 comments on commit 5b22527

Please sign in to comment.