chiark / gitweb /
innduct-stats-report shows deferral
[innduct.git] / innduct.h
index 65077d66b865a80f19d6fbe4a0e2be735ed3d4c6..00be640f73a33aca2e15ab2202cee214d6dab8df 100644 (file)
--- a/innduct.h
+++ b/innduct.h
@@ -218,6 +218,10 @@ typedef enum {
   RCI_max
 } ResultCountIndex;
 
+typedef enum {
+  read_ok, read_blank, read_err, nooffer_missing,
+  ECI_max
+} EventCountIndex;
 
 /*----- transmission buffers -----*/
 
@@ -237,6 +241,11 @@ struct XmitDetails {
 
 /*----- core operational data structure types -----*/
 
+typedef struct {
+  int results[art_MaxState][RCI_max];
+  int events[ECI_max];
+} Counts;
+
 struct InputFile {
   /* This is also an instance of struct oop_readable */
   struct oop_readable readable; /* first */
@@ -254,8 +263,7 @@ struct InputFile {
   long inprogress; /* includes queue.count and also articles in conns */
   long autodefer; /* -1 means not doing autodefer */
 
-  int counts[art_MaxState][RCI_max];
-  int readcount_ok, readcount_blank, readcount_err, count_nooffer_missing;
+  Counts counts;
   char path[];
 };
 
@@ -383,6 +391,10 @@ void conn_dispose(Conn *conn);
 void vconnfail(Conn *conn, const char *fmt, va_list al) PRINTF(2,0);
 void connfail(Conn *conn, const char *fmt, ...)         PRINTF(2,3);
 
+void notice_conns_more(const char *new_kind);
+void notice_conns_fewer(void);
+void notice_conns_stats(void);
+
 int allow_connect_start(void);
 void connect_start(void);
 
@@ -489,6 +501,8 @@ extern int until_stats_log;
 extern StateMachineState sms;
 extern int until_flush;
 extern InputFile *main_input_file, *flushing_input_file, *backlog_input_file;
+extern Counts backlog_counts;
+extern int backlog_counts_report;
 extern FILE *defer;
 extern int until_connect, until_backlog_nextscan;
 extern double accept_proportion;