diff --git a/src/zm.cpp b/src/zm.cpp index d56e8c289..30bea140a 100644 --- a/src/zm.cpp +++ b/src/zm.cpp @@ -1525,7 +1525,7 @@ Monitor::Monitor( int p_id, char *p_name, int p_function, int p_device, int p_ch } } - record_zone_stats = true; + record_event_stats = ZM_RECORD_EVENT_STATS; } Monitor::~Monitor() @@ -1804,7 +1804,7 @@ bool Monitor::Analyse() if ( zones[i]->Alarmed() ) { alarm_image.Overlay( zones[i]->AlarmImage() ); - if ( record_zone_stats ) + if ( record_event_stats ) { zones[i]->RecordStats( event ); } diff --git a/src/zm.h b/src/zm.h index f66087bea..6aa383f6d 100644 --- a/src/zm.h +++ b/src/zm.h @@ -612,7 +612,7 @@ protected: SharedImages *shared_images; - bool record_zone_stats; + bool record_event_stats; public: Monitor( int p_id, char *p_name, int p_function, int p_device, int p_channel, int p_format, int p_width, int p_height, int p_colours, bool p_capture, char *p_label_format, const Coord &p_label_coord, int p_warmup_count, int p_pre_event_count, int p_post_event_count, int p_alarm_frame_count, int p_image_buffer_count, int p_fps_report_interval, int p_ref_blend_perc, int p_n_zones=0, Zone *p_zones[]=0 ); diff --git a/src/zmcfg.h.z b/src/zmcfg.h.z index e20cd5602..7a9d1c826 100644 --- a/src/zmcfg.h.z +++ b/src/zmcfg.h.z @@ -30,3 +30,5 @@ #define ZM_EVENT_DIR "events" // Event directory relative to web directory #define ZM_FORCED_ALARM_SCORE 255 // Score to give X10 forced alarms + +#define ZM_RECORD_EVENT_STATS true // Whether to record event statistical information, change to false if too slow