diff_msecs = timeval_diff_msecs(&ioloop_timeval, &req->submit_time);
stats_r->total_msecs = (unsigned int)I_MAX(diff_msecs, 0);
+ /* elapsed time since message was first sent */
+ if (req->first_sent_time.tv_sec > 0) {
+ diff_msecs = timeval_diff_msecs(&ioloop_timeval, &req->first_sent_time);
+ stats_r->first_sent_msecs = (unsigned int)I_MAX(diff_msecs, 0);
+ }
+
/* elapsed time since message was last sent */
if (req->sent_time.tv_sec > 0) {
diff_msecs = timeval_diff_msecs(&ioloop_timeval, &req->sent_time);
- stats_r->sent_msecs = (unsigned int)I_MAX(diff_msecs, 0);
+ stats_r->last_sent_msecs = (unsigned int)I_MAX(diff_msecs, 0);
}
if (req->conn != NULL) {
http_client_request_get_stats(req, &stats);
- if (stats.sent_msecs > 0) {
+ if (stats.last_sent_msecs > 0) {
str_printfa(str, "sent %u.%03u secs ago",
- stats.sent_msecs/1000, stats.sent_msecs%1000);
+ stats.last_sent_msecs/1000, stats.last_sent_msecs%1000);
} else {
str_append(str, "not yet sent");
}
struct http_client_request_stats {
/* Total elapsed time since message was submitted */
unsigned int total_msecs;
+ /* Elapsed time since message was first sent */
+ unsigned int first_sent_msecs;
/* Elapsed time since message was last sent */
- unsigned int sent_msecs;
+ unsigned int last_sent_msecs;
/* Time spent in other ioloops */
unsigned int other_ioloop_msecs;