Commit 4148aaba authored by Philippe Gerum's avatar Philippe Gerum
Browse files

benchmark/latmus: latmon: re-instate warm-up time



Add back a 1s warm-up time, making sure not to include the delta
values collected during this period in the histogram distribution this
time.
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
parent cc27f3c0
......@@ -244,7 +244,7 @@ static void gpio_ack_handler(struct device *port,
static int monitor(void)
{
u32_t pulse_date, delta, delta_ns, delta_usecs;
u32_t pulse_date, delta, delta_ns, delta_usecs, warmup_count = 0;
unsigned int key;
int cell;
......@@ -277,6 +277,11 @@ static int monitor(void)
continue;
}
if (warmup_count < max_samples_per_bulk) {
warmup_count++;
continue;
}
delta = ack_date < pulse_date ? ~pulse_date + 1 + ack_date :
ack_date - pulse_date;
delta_ns = (u32_t)k_cyc_to_ns_floor64(delta);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment