mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Annotate scheduled events with intended timestamp.
This commit is contained in:
parent
fa84d2896a
commit
ae152f1777
7 changed files with 73 additions and 6 deletions
41
testing/btest/Baseline/language.event-ts-scheduled/out
Normal file
41
testing/btest/Baseline/language.event-ts-scheduled/out
Normal file
|
@ -0,0 +1,41 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
>> Run 0 (1989-12-12-22:00:00)
|
||||
<< Run 0 (1989-12-12-22:00:00)
|
||||
[1989-12-12-23:00:00] Test was scheduled at 1989-12-12-22:00:00 for 1989-12-12-22:15:00
|
||||
[1989-12-12-23:00:00] Test was scheduled at 1989-12-12-22:00:00 for 1989-12-12-22:30:00
|
||||
>> Run 1 (1989-12-12-23:00:00)
|
||||
<< Run 1 (1989-12-12-23:00:00)
|
||||
[1989-12-13-00:00:00] Test was scheduled at 1989-12-12-23:00:00 for 1989-12-12-23:15:00
|
||||
[1989-12-13-00:00:00] Test was scheduled at 1989-12-12-23:00:00 for 1989-12-12-23:30:00
|
||||
>> Run 2 (1989-12-13-00:00:00)
|
||||
<< Run 2 (1989-12-13-00:00:00)
|
||||
[1989-12-13-01:00:00] Test was scheduled at 1989-12-13-00:00:00 for 1989-12-13-00:15:00
|
||||
[1989-12-13-01:00:00] Test was scheduled at 1989-12-13-00:00:00 for 1989-12-13-00:30:00
|
||||
>> Run 3 (1989-12-13-01:00:00)
|
||||
<< Run 3 (1989-12-13-01:00:00)
|
||||
[1989-12-13-02:00:00] Test was scheduled at 1989-12-13-01:00:00 for 1989-12-13-01:15:00
|
||||
[1989-12-13-02:00:00] Test was scheduled at 1989-12-13-01:00:00 for 1989-12-13-01:30:00
|
||||
>> Run 4 (1989-12-13-02:00:00)
|
||||
<< Run 4 (1989-12-13-02:00:00)
|
||||
[1989-12-13-03:00:00] Test was scheduled at 1989-12-13-02:00:00 for 1989-12-13-02:15:00
|
||||
[1989-12-13-03:00:00] Test was scheduled at 1989-12-13-02:00:00 for 1989-12-13-02:30:00
|
||||
>> Run 5 (1989-12-13-03:00:00)
|
||||
<< Run 5 (1989-12-13-03:00:00)
|
||||
[1989-12-13-04:00:00] Test was scheduled at 1989-12-13-03:00:00 for 1989-12-13-03:15:00
|
||||
[1989-12-13-04:00:00] Test was scheduled at 1989-12-13-03:00:00 for 1989-12-13-03:30:00
|
||||
>> Run 6 (1989-12-13-04:00:00)
|
||||
<< Run 6 (1989-12-13-04:00:00)
|
||||
[1989-12-13-05:00:00] Test was scheduled at 1989-12-13-04:00:00 for 1989-12-13-04:15:00
|
||||
[1989-12-13-05:00:00] Test was scheduled at 1989-12-13-04:00:00 for 1989-12-13-04:30:00
|
||||
>> Run 7 (1989-12-13-05:00:00)
|
||||
<< Run 7 (1989-12-13-05:00:00)
|
||||
[1989-12-13-06:00:00] Test was scheduled at 1989-12-13-05:00:00 for 1989-12-13-05:15:00
|
||||
[1989-12-13-06:00:00] Test was scheduled at 1989-12-13-05:00:00 for 1989-12-13-05:30:00
|
||||
>> Run 8 (1989-12-13-06:00:00)
|
||||
<< Run 8 (1989-12-13-06:00:00)
|
||||
[1989-12-13-07:00:00] Test was scheduled at 1989-12-13-06:00:00 for 1989-12-13-06:15:00
|
||||
[1989-12-13-07:00:00] Test was scheduled at 1989-12-13-06:00:00 for 1989-12-13-06:30:00
|
||||
>> Run 9 (1989-12-13-07:00:00)
|
||||
<< Run 9 (1989-12-13-07:00:00)
|
||||
[1989-12-13-07:00:00] Test was scheduled at 1989-12-13-07:00:00 for 1989-12-13-07:15:00
|
||||
[1989-12-13-07:00:00] Test was scheduled at 1989-12-13-07:00:00 for 1989-12-13-07:30:00
|
BIN
testing/btest/Traces/ticks-dns-1hr.pcap
Normal file
BIN
testing/btest/Traces/ticks-dns-1hr.pcap
Normal file
Binary file not shown.
20
testing/btest/language/event-ts-scheduled.zeek
Normal file
20
testing/btest/language/event-ts-scheduled.zeek
Normal file
|
@ -0,0 +1,20 @@
|
|||
# @TEST-EXEC: zeek -b -r $TRACES/ticks-dns-1hr.pcap %INPUT > out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
global runs = 0;
|
||||
|
||||
event test(schedule_time: time)
|
||||
{
|
||||
print fmt("[%D] Test was scheduled at %D for %D", network_time(),
|
||||
schedule_time, current_event_time());
|
||||
}
|
||||
|
||||
event new_connection(c: connection)
|
||||
{
|
||||
local nt = network_time();
|
||||
print fmt(">> Run %s (%D)", runs, nt);
|
||||
schedule 30 mins { test(nt) };
|
||||
schedule 15 mins { test(nt) };
|
||||
print fmt("<< Run %s (%D)", runs, nt);
|
||||
++runs;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue