@@ -43,36 +43,38 @@ static Event *raw_stat_sync_cont_event;
4343static Event *config_update_cont_event;
4444static Event *sync_cont_event;
4545
46+ static DbgCtl dbg_ctl_statsproc{" statsproc" };
47+
4648// -------------------------------------------------------------------------
4749// Simple setters for the intervals to decouple this from the proxy
4850// -------------------------------------------------------------------------
4951void
5052RecProcess_set_raw_stat_sync_interval_ms (int ms)
5153{
52- Debug ( " statsproc " , " g_rec_raw_stat_sync_interval_ms -> %d" , ms);
54+ Dbg (dbg_ctl_statsproc , " g_rec_raw_stat_sync_interval_ms -> %d" , ms);
5355 g_rec_raw_stat_sync_interval_ms = ms;
5456 if (raw_stat_sync_cont_event) {
55- Debug ( " statsproc " , " Rescheduling raw-stat syncer" );
57+ Dbg (dbg_ctl_statsproc , " Rescheduling raw-stat syncer" );
5658 raw_stat_sync_cont_event->schedule_every (HRTIME_MSECONDS (g_rec_raw_stat_sync_interval_ms));
5759 }
5860}
5961void
6062RecProcess_set_config_update_interval_ms (int ms)
6163{
62- Debug ( " statsproc " , " g_rec_config_update_interval_ms -> %d" , ms);
64+ Dbg (dbg_ctl_statsproc , " g_rec_config_update_interval_ms -> %d" , ms);
6365 g_rec_config_update_interval_ms = ms;
6466 if (config_update_cont_event) {
65- Debug ( " statsproc " , " Rescheduling config syncer" );
67+ Dbg (dbg_ctl_statsproc , " Rescheduling config syncer" );
6668 config_update_cont_event->schedule_every (HRTIME_MSECONDS (g_rec_config_update_interval_ms));
6769 }
6870}
6971void
7072RecProcess_set_remote_sync_interval_ms (int ms)
7173{
72- Debug ( " statsproc " , " g_rec_remote_sync_interval_ms -> %d" , ms);
74+ Dbg (dbg_ctl_statsproc , " g_rec_remote_sync_interval_ms -> %d" , ms);
7375 g_rec_remote_sync_interval_ms = ms;
7476 if (sync_cont_event) {
75- Debug ( " statsproc " , " Rescheduling remote syncer" );
77+ Dbg (dbg_ctl_statsproc , " Rescheduling remote syncer" );
7678 sync_cont_event->schedule_every (HRTIME_MSECONDS (g_rec_remote_sync_interval_ms));
7779 }
7880}
@@ -86,7 +88,7 @@ struct raw_stat_sync_cont : public Continuation {
8688 exec_callbacks (int /* event */ , Event * /* e */ )
8789 {
8890 RecExecRawStatSyncCbs ();
89- Debug ( " statsproc " , " raw_stat_sync_cont() processed" );
91+ Dbg (dbg_ctl_statsproc , " raw_stat_sync_cont() processed" );
9092
9193 return EVENT_CONT;
9294 }
@@ -101,7 +103,7 @@ struct config_update_cont : public Continuation {
101103 exec_callbacks (int /* event */ , Event * /* e */ )
102104 {
103105 RecExecConfigUpdateCbs (REC_PROCESS_UPDATE_REQUIRED);
104- Debug ( " statsproc " , " config_update_cont() processed" );
106+ Dbg (dbg_ctl_statsproc , " config_update_cont() processed" );
105107
106108 return EVENT_CONT;
107109 }
@@ -132,7 +134,7 @@ struct sync_cont : public Continuation {
132134 {
133135 RecSyncStatsFile ();
134136
135- Debug ( " statsproc " , " sync_cont() processed" );
137+ Dbg (dbg_ctl_statsproc , " sync_cont() processed" );
136138
137139 return EVENT_CONT;
138140 }
@@ -173,17 +175,17 @@ RecProcessStart()
173175 return REC_ERR_OKAY;
174176 }
175177
176- Debug ( " statsproc " , " Starting sync continuations:" );
178+ Dbg (dbg_ctl_statsproc , " Starting sync continuations:" );
177179 raw_stat_sync_cont *rssc = new raw_stat_sync_cont (new_ProxyMutex ());
178- Debug ( " statsproc " , " raw-stat syncer" );
180+ Dbg (dbg_ctl_statsproc , " raw-stat syncer" );
179181 raw_stat_sync_cont_event = eventProcessor.schedule_every (rssc, HRTIME_MSECONDS (g_rec_raw_stat_sync_interval_ms), ET_TASK);
180182
181183 config_update_cont *cuc = new config_update_cont (new_ProxyMutex ());
182- Debug ( " statsproc " , " config syncer" );
184+ Dbg (dbg_ctl_statsproc , " config syncer" );
183185 config_update_cont_event = eventProcessor.schedule_every (cuc, HRTIME_MSECONDS (g_rec_config_update_interval_ms), ET_TASK);
184186
185187 sync_cont *sc = new sync_cont (new_ProxyMutex ());
186- Debug ( " statsproc " , " remote syncer" );
188+ Dbg (dbg_ctl_statsproc , " remote syncer" );
187189 sync_cont_event = eventProcessor.schedule_every (sc, HRTIME_MSECONDS (g_rec_remote_sync_interval_ms), ET_TASK);
188190
189191 g_started = true ;
0 commit comments