mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
segment_profiling: Remove SegmentProfiler and load_sample event
While it seems interesting functionality, this hasn't been documented, maintained or knowingly leveraged for many years. There are various other approaches today, too: * We track the number of event handler invocations regardless of profiling. It's possible to approximate a load_sample event by comparing the result of two get_event_stats() calls. Or, visualize the corresponding counters in a Prometheus setup to get an idea of event/s broken down by event names. * HookCallFunction() allows to intercept script execution, including measuring the time execution takes. * The global call_stack and g_frame_stack can be used from plugins (and even external processes) to walk the Zeek script stack at certain points to implement a sampling profiler. * USDT probes or more plugin hooks will likely be preferred over Zeek builtin functionality in the future. Relates to #3458
This commit is contained in:
parent
df37cadbe8
commit
3f7881a57b
16 changed files with 16 additions and 279 deletions
|
@ -1,7 +1,7 @@
|
|||
# @TEST-EXEC: zeek -b -r $TRACES/smtp.trace policy/misc/dump-events %INPUT >all-events.log
|
||||
# @TEST-EXEC: zeek -b -r $TRACES/smtp.trace policy/misc/dump-events %INPUT DumpEvents::include_args=F >all-events-no-args.log
|
||||
# @TEST-EXEC: zeek -b -r $TRACES/smtp.trace policy/misc/dump-events %INPUT DumpEvents::include=/smtp_/ >smtp-events.log
|
||||
# @TEST-EXEC: zeek -b -r $TRACES/smtp.trace policy/misc/dump-events %INPUT DumpEvents::dump_all_events=T | grep -v "CPU: interval\|samples: load_sample_info\|path: string" > really-all-events.log
|
||||
# @TEST-EXEC: zeek -b -r $TRACES/smtp.trace policy/misc/dump-events %INPUT DumpEvents::dump_all_events=T | grep -v "CPU: interval\|path: string" > really-all-events.log
|
||||
#
|
||||
# @TEST-EXEC: btest-diff all-events.log
|
||||
# @TEST-EXEC: btest-diff all-events-no-args.log
|
||||
|
|
|
@ -3,13 +3,6 @@
|
|||
|
||||
@load policy/misc/stats
|
||||
|
||||
event load_sample(samples: load_sample_info, CPU: interval, dmem: int)
|
||||
{
|
||||
# This output not part of baseline as it varies, but guess this test
|
||||
# should still exist to cover potential memory leaks.
|
||||
print CPU;
|
||||
}
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
# Various fields will be unstable for use in baseline, so use one that is.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue