MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / new

Method new

crates/hyperqueue/src/client/commands/journal/report.rs:52–59  ·  view source on GitHub ↗
(init_time: TimeDelta, init_value: T, start_time: Option<TimeDelta>)

Source from the content-addressed store, hash-verified

50
51impl<T: Copy + Add<T, Output = T>> Trace<T> {
52 pub fn new(init_time: TimeDelta, init_value: T, start_time: Option<TimeDelta>) -> Self {
53 let init_time = start_time.unwrap_or(TimeDelta::zero()).max(init_time);
54 Self {
55 time: vec![init_time.as_seconds_f32()],
56 value: vec![init_value],
57 start_time,
58 }
59 }
60 pub fn add_change(&mut self, time: TimeDelta, delta: T) {
61 if let Some(start_time) = self.start_time
62 && time < start_time

Callers

nothing calls this directly

Calls 15

ResCountClass · 0.85
as_refMethod · 0.80
to_stringMethod · 0.80
add_changeMethod · 0.80
new_submitMethod · 0.80
task_start_stopMethod · 0.80
values_mutMethod · 0.80
add_valueMethod · 0.80
nextMethod · 0.45
insertMethod · 0.45
new_workerMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected