mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Added the profiling script.
This commit is contained in:
parent
9c2273b7a7
commit
d201215359
1 changed files with 19 additions and 0 deletions
19
scripts/policy/misc/profiling.bro
Normal file
19
scripts/policy/misc/profiling.bro
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
##! Turns on profiling of Bro resource consumption.
|
||||||
|
|
||||||
|
module Profiling;
|
||||||
|
|
||||||
|
redef profiling_file = open_log_file("prof");
|
||||||
|
|
||||||
|
export {
|
||||||
|
## Cheap profiling every 15 seconds.
|
||||||
|
redef profiling_interval = 15 secs &redef;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Expensive profiling every 5 minutes.
|
||||||
|
redef expensive_profiling_multiple = 20;
|
||||||
|
|
||||||
|
event bro_init()
|
||||||
|
{
|
||||||
|
set_buf(profiling_file, F);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue