mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 17:51:53 +00:00
Loops track also locking time
This commit is contained in:
parent
2ddb34c9d1
commit
ab83bab9d1
@ -974,10 +974,10 @@ bird_thread_show(void *data)
|
|||||||
(cs - i > fs) ? 0 : loop->time_by_sec_ns[(cs - i) % TIME_BY_SEC_SIZE]);
|
(cs - i > fs) ? 0 : loop->time_by_sec_ns[(cs - i) % TIME_BY_SEC_SIZE]);
|
||||||
bptr[-1] = 0; /* Drop the trailing space */
|
bptr[-1] = 0; /* Drop the trailing space */
|
||||||
|
|
||||||
cli_printf(tsd->cli, -1026, " Loop %s total time: %t",
|
cli_printf(tsd->cli, -1026, " Loop %s", domain_name(loop->time.domain));
|
||||||
domain_name(loop->time.domain), loop->total_time_spent_ns NS);
|
cli_printf(tsd->cli, -1026, " Total time: %t s", loop->total_time_spent_ns NS);
|
||||||
cli_printf(tsd->cli, -1026, " last %d secs [ns]: %s",
|
cli_printf(tsd->cli, -1026, " Total locking time: %t s", loop->total_time_locking_ns NS);
|
||||||
MIN(CURRENT_SEC+1, TIME_BY_SEC_SIZE), b);
|
cli_printf(tsd->cli, -1026, " Last %d secs [ns]: %s", MIN(CURRENT_SEC+1, TIME_BY_SEC_SIZE), b);
|
||||||
}
|
}
|
||||||
|
|
||||||
total_time_ns += loop->total_time_spent_ns;
|
total_time_ns += loop->total_time_spent_ns;
|
||||||
@ -1183,6 +1183,8 @@ birdloop_run(void *_loop)
|
|||||||
if (locked_time > end_time)
|
if (locked_time > end_time)
|
||||||
LOOP_WARN(loop, "locked %luns after its scheduled end time", locked_time - end_time);
|
LOOP_WARN(loop, "locked %luns after its scheduled end time", locked_time - end_time);
|
||||||
|
|
||||||
|
loop->total_time_locking_ns += (locked_time - start_time);
|
||||||
|
|
||||||
uint repeat, loop_runs = 0;
|
uint repeat, loop_runs = 0;
|
||||||
do {
|
do {
|
||||||
repeat = 0;
|
repeat = 0;
|
||||||
|
@ -69,6 +69,7 @@ struct birdloop
|
|||||||
u64 time_by_sec_ns[TIME_BY_SEC_SIZE];
|
u64 time_by_sec_ns[TIME_BY_SEC_SIZE];
|
||||||
u64 last_time_finished_ns;
|
u64 last_time_finished_ns;
|
||||||
u64 total_time_spent_ns;
|
u64 total_time_spent_ns;
|
||||||
|
u64 total_time_locking_ns;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bird_thread
|
struct bird_thread
|
||||||
|
Loading…
Reference in New Issue
Block a user