mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
Copy docs into Zeek repo directly
This is based on commit 99e6942efec5feff50523f6b2a1f5868f19ab638 from the zeek-docs repo.
This commit is contained in:
parent
979a98c73c
commit
adce4e604a
1075 changed files with 169492 additions and 1 deletions
19
doc/frameworks/broker/store-sqlite-tuning.zeek
Normal file
19
doc/frameworks/broker/store-sqlite-tuning.zeek
Normal file
|
@ -0,0 +1,19 @@
|
|||
global h: opaque of Broker::Store;
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
# Use WAL mode.
|
||||
local sqlite_options=Broker::SQLiteOptions(
|
||||
$synchronous=Broker::SQLITE_SYNCHRONOUS_NORMAL,
|
||||
$journal_mode=Broker::SQLITE_JOURNAL_MODE_WAL,
|
||||
);
|
||||
local options = Broker::BackendOptions($sqlite=sqlite_options);
|
||||
h = Broker::create_master("persistent-store", Broker::SQLITE, options);
|
||||
|
||||
local c = 1000;
|
||||
while (c > 0)
|
||||
{
|
||||
Broker::put(h, cat(c), rand(10000));
|
||||
--c;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue