From e5faba0f19d11021f6416ba0884712241835dee0 Mon Sep 17 00:00:00 2001 From: Max Rottenkolber Date: Fri, 7 Dec 2018 15:47:10 +0100 Subject: [PATCH] Fix some wrong assumptions about the event rate Realized: 9 is the rate that means "log always". Elevate some rare but important events to rate 9. --- src/core/app.events | 8 ++++---- src/core/app.lua | 6 +++--- src/core/engine.events | 10 +++++----- src/core/packet.events | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/core/app.events b/src/core/app.events index 0fb3611263..e72e76047a 100644 --- a/src/core/app.events +++ b/src/core/app.events @@ -1,13 +1,13 @@ -1,6|started: +1,9|started: The app has been started. (Returned from new() callback.) -1,6|linked: +1,9|linked: The app has been linked. (Returned from link() callback.) -1,6|reconfigured: +1,9|reconfigured: The app has been reconfigured. (Returned from reconfig() callback.) -1,6|stopped: +1,9|stopped: The app has been stopped. (Returned from stop() callback.) diff --git a/src/core/app.lua b/src/core/app.lua index 5e39db5c80..00034e8119 100644 --- a/src/core/app.lua +++ b/src/core/app.lua @@ -45,7 +45,7 @@ local timeline_log, events -- initialized on demand function timeline () if timeline_log == nil then timeline_log = timeline_mod.new("engine/timeline") - timeline_mod.rate(timeline_log, 7) -- initialize rate to "no logging" + timeline_mod.rate(timeline_log, 9) -- initially log events with rate >= 9 events = timeline_mod.load_events(timeline_log, "core.engine") end return timeline_log @@ -59,7 +59,7 @@ function randomize_log_rate () -- Could be better to reduce the log rate over time to "stretch" -- logs for long running processes? Improvements possible :-). -- - -- We use rates 0-6 where 6 means "log always", and 0 means "log never." + -- We use rates 0-9 where 9 means "log always", and 0 means "log never." local rate = math.max(1, math.ceil(math.log(math.random(5^9))/math.log(5))) timeline_mod.rate(timeline_log, rate) end @@ -450,7 +450,7 @@ function apply_config_actions (actions) events.config_applied() compute_breathe_order () - events.breath_order_computed() + events.breathe_order_computed() end -- Sort the NODES topologically according to SUCCESSORS via diff --git a/src/core/engine.events b/src/core/engine.events index 25b275d851..10e9e32687 100644 --- a/src/core/engine.events +++ b/src/core/engine.events @@ -63,16 +63,16 @@ The engine resumes operation after sleeping voluntarily. The engine stops the traffic processing loop. -0,6|config_actions_computed: +0,9|config_actions_computed: The engine has computed the actions required for applying a new configuration. -0,6|configure: config +0,9|configure: config The engine begins to apply a new configuration. 'config' is the number of this configuration. -0,6|config_applied: +0,9|config_applied: The engine has applied a new configuration. -0,6|breath_order_computed: -The engine has computed the breath order of a new configuration. \ No newline at end of file +0,9|breathe_order_computed: +The engine has computed the breath order of a new configuration. diff --git a/src/core/packet.events b/src/core/packet.events index e004a6da52..752a3f25ee 100644 --- a/src/core/packet.events +++ b/src/core/packet.events @@ -1,5 +1,5 @@ -9,6|packets_preallocated: packets -DMA memory for packets had been preallocated from the operating system. +9,9|packets_preallocated: packets +DMA memory for packets has been preallocated from the operating system. 'packets' is the number of packets for which space has been reserved.