chiark
/
gitweb
/
~ian
/
innduct.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Accumulate backlog counts rather than reporting every file
[innduct.git]
/
innduct.h
diff --git
a/innduct.h
b/innduct.h
index 4ccae7a3e5e60cf33c3945ac982bba2f03a7d01d..fc04d8a6688d93ba10c65d352e5ccc57f54077ff 100644
(file)
--- a/
innduct.h
+++ b/
innduct.h
@@
-176,6
+176,7
@@
extern int backlog_spontrescan_periods;
extern int spontaneous_flush_periods;
extern int max_separated_periods;
extern int need_activity_periods;
extern int spontaneous_flush_periods;
extern int max_separated_periods;
extern int need_activity_periods;
+extern int stats_log_periods;
extern int lowvol_thresh;
extern int lowvol_periods;
extern int lowvol_thresh;
extern int lowvol_periods;
@@
-217,6
+218,10
@@
typedef enum {
RCI_max
} ResultCountIndex;
RCI_max
} ResultCountIndex;
+typedef enum {
+ read_ok, read_blank, read_err, nooffer_missing,
+ ECI_max
+} EventCountIndex;
/*----- transmission buffers -----*/
/*----- transmission buffers -----*/
@@
-236,6
+241,11
@@
struct XmitDetails {
/*----- core operational data structure types -----*/
/*----- 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 */
struct InputFile {
/* This is also an instance of struct oop_readable */
struct oop_readable readable; /* first */
@@
-253,8
+263,7
@@
struct InputFile {
long inprogress; /* includes queue.count and also articles in conns */
long autodefer; /* -1 means not doing autodefer */
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[];
};
char path[];
};
@@
-362,7
+371,7
@@
static inline int isewouldblock(int errnoval) {
PRINTF(3,0);
INNLOGSETS(INNLOGSET_DECLARE)
PRINTF(3,0);
INNLOGSETS(INNLOGSET_DECLARE)
-/*-----
inn
duct.c -----*/
+/*----- duct.c -----*/
void postfork(void);
void period(void);
void postfork(void);
void period(void);
@@
-433,6
+442,7
@@
void statemc_period_poll(void);
void statemc_lock(void);
void init_signals(void);
void statemc_init(void);
void statemc_lock(void);
void init_signals(void);
void statemc_init(void);
+void showstats(void);
#define SMS(newstate, periods, why) \
(statemc_setstate(sm_##newstate,(periods),#newstate,(why)))
#define SMS(newstate, periods, why) \
(statemc_setstate(sm_##newstate,(periods),#newstate,(why)))
@@
-472,7
+482,7
@@
extern pid_t inndcomm_child;
/*========== general operational variables ==========*/
/*========== general operational variables ==========*/
-/*
inn
duct.c */
+/* duct.c */
extern oop_source *loop;
extern ConnList conns;
extern char *path_lock, *path_flushing, *path_defer, *path_dump;
extern oop_source *loop;
extern ConnList conns;
extern char *path_lock, *path_flushing, *path_defer, *path_dump;
@@
-481,11
+491,14
@@
extern pid_t self_pid;
extern int *lowvol_perperiod;
extern int lowvol_circptr;
extern int lowvol_total; /* does not include current period */
extern int *lowvol_perperiod;
extern int lowvol_circptr;
extern int lowvol_total; /* does not include current period */
+extern int until_stats_log;
/* statemc.c */
extern StateMachineState sms;
extern int until_flush;
extern InputFile *main_input_file, *flushing_input_file, *backlog_input_file;
/* statemc.c */
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;
extern FILE *defer;
extern int until_connect, until_backlog_nextscan;
extern double accept_proportion;