mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

This is based on commit 2731def9159247e6da8a3191783c89683363689c from the zeek-docs repo.
19 lines
450 B
Text
19 lines
450 B
Text
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;
|
|
}
|
|
}
|