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
|
@ -4384,11 +4384,6 @@ type signature_state: record {
|
|||
payload_size: count; ##< Payload size of the first matching packet of current endpoint.
|
||||
};
|
||||
|
||||
# Type used to report load samples via :zeek:see:`load_sample`. For now, it's a
|
||||
# set of names (event names, source file names, and perhaps ``<source file, line
|
||||
# number>``), which were seen during the sample.
|
||||
type load_sample_info: set[string];
|
||||
|
||||
## A BitTorrent peer.
|
||||
##
|
||||
## .. zeek:see:: bittorrent_peer_set
|
||||
|
@ -5025,27 +5020,21 @@ const log_rotate_base_time = "0:00" &redef;
|
|||
## Write profiling info into this file in regular intervals. The easiest way to
|
||||
## activate profiling is loading :doc:`/scripts/policy/misc/profiling.zeek`.
|
||||
##
|
||||
## .. zeek:see:: profiling_interval expensive_profiling_multiple segment_profiling
|
||||
## .. zeek:see:: profiling_interval expensive_profiling_multiple
|
||||
global profiling_file: file &redef;
|
||||
|
||||
## Update interval for profiling (0 disables). The easiest way to activate
|
||||
## profiling is loading :doc:`/scripts/policy/misc/profiling.zeek`.
|
||||
##
|
||||
## .. zeek:see:: profiling_file expensive_profiling_multiple segment_profiling
|
||||
## .. zeek:see:: profiling_file expensive_profiling_multiple
|
||||
const profiling_interval = 0 secs &redef;
|
||||
|
||||
## Multiples of :zeek:see:`profiling_interval` at which (more expensive) memory
|
||||
## profiling is done (0 disables).
|
||||
##
|
||||
## .. zeek:see:: profiling_interval profiling_file segment_profiling
|
||||
## .. zeek:see:: profiling_interval profiling_file
|
||||
const expensive_profiling_multiple = 0 &redef;
|
||||
|
||||
## If true, then write segment profiling information (very high volume!)
|
||||
## in addition to profiling statistics.
|
||||
##
|
||||
## .. zeek:see:: profiling_interval expensive_profiling_multiple profiling_file
|
||||
const segment_profiling = F &redef;
|
||||
|
||||
## Output modes for packet profiling information.
|
||||
##
|
||||
## .. zeek:see:: pkt_profile_mode pkt_profile_freq pkt_profile_file
|
||||
|
@ -5071,14 +5060,6 @@ const pkt_profile_freq = 0.0 &redef;
|
|||
## .. zeek:see:: pkt_profile_modes pkt_profile_freq pkt_profile_mode
|
||||
global pkt_profile_file: file &redef;
|
||||
|
||||
## Rate at which to generate :zeek:see:`load_sample` events. As all
|
||||
## events, the event is only generated if you've also defined a
|
||||
## :zeek:see:`load_sample` handler. Units are inverse number of packets; e.g.,
|
||||
## a value of 20 means "roughly one in every 20 packets".
|
||||
##
|
||||
## .. zeek:see:: load_sample
|
||||
global load_sample_freq = 20 &redef;
|
||||
|
||||
## Whether to attempt to automatically detect SYN/FIN/RST-filtered trace
|
||||
## and not report missing segments for such connections.
|
||||
## If this is enabled, then missing data at the end of connections may not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue