3 #ifndef _MSG_STATS_H_INCLUDED_
4 #define _MSG_STATS_H_INCLUDED_
10 /* message delivery profiling
12 /* #include <msg_stats.h>
32 * This structure contains the time stamps from various mail delivery stages,
33 * as well as the connection reuse count. The time stamps provide additional
34 * insight into the nature of performance bottle necks.
36 * For convenience, we record absolute time stamps instead of time differences.
37 * This is because the decision of what numbers to subtract actually depends
38 * on program history. Since we prefer to compute time differences in one
39 * place, we postpone this task until the end, in log_adhoc().
41 * A zero time stamp or reuse count means the information is not supplied.
43 * Specifically, a zero active_arrival value means that the message did not
44 * reach the queue manager; and a zero agent_handoff time means that the
45 * queue manager did not give the message to a delivery agent.
47 * Some network clients update the conn_setup_done value when connection setup
50 * The deliver_done value is usually left at zero, which means use the wall
51 * clock time when reporting recipient status information. The exception is
52 * with delivery agents that can deliver multiple recipients in a single
53 * transaction. These agents explicitly update the deliver_done time stamp
54 * to ensure that multiple recipient records show the exact same delay
58 struct timeval incoming_arrival
; /* incoming queue entry */
59 struct timeval active_arrival
; /* active queue entry */
60 struct timeval agent_handoff
; /* delivery agent hand-off */
61 struct timeval conn_setup_done
; /* connection set-up done */
62 struct timeval deliver_done
; /* transmission done */
63 int reuse_count
; /* connection reuse count */
66 #define MSG_STATS_INIT(st) \
68 memset((char *) (st), 0, sizeof(*(st))), \
72 #define MSG_STATS_INIT1(st, member, value) \
74 memset((char *) (st), 0, sizeof(*(st))), \
75 ((st)->member = (value)), \
79 #define MSG_STATS_INIT2(st, m1, v1, m2, v2) \
81 memset((char *) (st), 0, sizeof(*(st))), \
87 extern int msg_stats_scan(ATTR_SCAN_MASTER_FN
, VSTREAM
*, int, void *);
88 extern int msg_stats_print(ATTR_PRINT_MASTER_FN
, VSTREAM
*, int, void *);
93 /* The Secure Mailer license must be distributed with this software.
96 /* IBM T.J. Watson Research
98 /* Yorktown Heights, NY 10598, USA