Browse Source

Show more EMM counters in stats messages.

This patch adds two new EMM counters in the regular stats messages.

Now the counters are:

 Received  - How much EMMs were received from the input.
 Skipped   - How much EMMs were skipped because of filtering.
 Sent      - How much EMMs were added to the sending queue.
 Processed - How much EMMs were sent to the CAMD server for processing.
Georgi Chorbadzhiyski 11 years ago
parent
commit
d617624e6f
3 changed files with 9 additions and 1 deletions
  1. 2
    0
      data.h
  2. 2
    0
      tables.c
  3. 5
    1
      tsdecrypt.c

+ 2
- 0
data.h View File

212
 	pidmap_t			pid_seen;
212
 	pidmap_t			pid_seen;
213
 
213
 
214
 	// Stats
214
 	// Stats
215
+	unsigned int		emm_input_count;
215
 	unsigned int		emm_seen_count;
216
 	unsigned int		emm_seen_count;
216
 	unsigned int		emm_processed_count;
217
 	unsigned int		emm_processed_count;
218
+	unsigned int		emm_skipped_count;
217
 	unsigned int		emm_report_interval;
219
 	unsigned int		emm_report_interval;
218
 	time_t				emm_last_report;
220
 	time_t				emm_last_report;
219
 
221
 

+ 2
- 0
tables.c View File

259
 
259
 
260
 	show_ts_pack(ts, pid, "emm", NULL, ts_packet);
260
 	show_ts_pack(ts, pid, "emm", NULL, ts_packet);
261
 
261
 
262
+	ts->emm_input_count++;
263
+
262
 	if (!ts->emm_send)
264
 	if (!ts->emm_send)
263
 		return;
265
 		return;
264
 
266
 

+ 5
- 1
tsdecrypt.c View File

800
 }
800
 }
801
 
801
 
802
 static void report_emms(struct ts *ts, time_t now) {
802
 static void report_emms(struct ts *ts, time_t now) {
803
-	ts_LOGf("EMM | Received %u and processed %u in %lu seconds.\n",
803
+	ts_LOGf("EMM | Received %u, Skipped %u, Sent %u, Processed %u in %lu seconds.\n",
804
+		ts->emm_input_count,
805
+		ts->emm_skipped_count,
804
 		ts->emm_seen_count,
806
 		ts->emm_seen_count,
805
 		ts->emm_processed_count,
807
 		ts->emm_processed_count,
806
 		now - ts->emm_last_report);
808
 		now - ts->emm_last_report);
809
 			now - ts->emm_last_report);
811
 			now - ts->emm_last_report);
810
 	}
812
 	}
811
 	ts->emm_last_report = now;
813
 	ts->emm_last_report = now;
814
+	ts->emm_input_count = 0;
812
 	ts->emm_seen_count = 0;
815
 	ts->emm_seen_count = 0;
816
+	ts->emm_skipped_count = 0;
813
 	ts->emm_processed_count = 0;
817
 	ts->emm_processed_count = 0;
814
 }
818
 }
815
 
819
 

Loading…
Cancel
Save