mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Give real variable names to SegmentProfiler objects when defining them (bugprone-unused-raii)
The reason behind this one is that without a real variable name, the profile objects are immediately desctructed and the profiling only happens for the small window when they were valid. If the intention is to profile the method where they were defined, this doesn't actually happen.
This commit is contained in:
parent
3572e38ec2
commit
c5748e4494
4 changed files with 5 additions and 5 deletions
|
@ -152,7 +152,7 @@ void EventMgr::Drain()
|
|||
if ( event_queue_flush_point )
|
||||
QueueEventFast(event_queue_flush_point, val_list{});
|
||||
|
||||
SegmentProfiler(segment_logger, "draining-events");
|
||||
SegmentProfiler prof(segment_logger, "draining-events");
|
||||
|
||||
PLUGIN_HOOK_VOID(HOOK_DRAIN_EVENTS, HookDrainEvents());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue