Skip to content

Commit c0331ed

Browse files
committed
logrotate_fs fixes
Signed-off-by: Brian L. Troutwine <brian.troutwine@datadoghq.com>
1 parent 9c95620 commit c0331ed

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lading/src/generator/file_gen/logrotate_fs.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ impl LoadProfile {
7878
fn to_model(self) -> model::LoadProfile {
7979
// For now, one tick is one second.
8080
match self {
81-
LoadProfile::Constant(bpt) => model::LoadProfile::Constant(bpt.get_bytes() as u64),
81+
LoadProfile::Constant(bpt) => model::LoadProfile::Constant(bpt.as_u128() as u64),
8282
LoadProfile::Linear {
8383
initial_bytes_per_second,
8484
rate,
8585
} => model::LoadProfile::Linear {
86-
start: initial_bytes_per_second.get_bytes() as u64,
87-
rate: rate.get_bytes() as u64,
86+
start: initial_bytes_per_second.as_u128() as u64,
87+
rate: rate.as_u128() as u64,
8888
},
8989
}
9090
}
@@ -137,12 +137,12 @@ impl Server {
137137
let mut rng = SmallRng::from_seed(config.seed);
138138

139139
let total_bytes =
140-
NonZeroU32::new(config.maximum_prebuild_cache_size_bytes.get_bytes() as u32)
140+
NonZeroU32::new(config.maximum_prebuild_cache_size_bytes.as_u128() as u32)
141141
.ok_or(Error::Zero)?;
142142
let block_cache = block::Cache::fixed(
143143
&mut rng,
144144
total_bytes,
145-
config.maximum_block_size.get_bytes(),
145+
config.maximum_block_size.as_u128(),
146146
&config.variant,
147147
)?;
148148

@@ -153,7 +153,7 @@ impl Server {
153153
&mut rng,
154154
start_time.elapsed().as_secs(),
155155
config.total_rotations,
156-
config.maximum_bytes_per_log.get_bytes() as u64,
156+
config.maximum_bytes_per_log.as_u128() as u64,
157157
block_cache,
158158
config.max_depth,
159159
config.concurrent_logs,

0 commit comments

Comments
 (0)