Skip to content

Commit 697dbfa

Browse files
author
Joshua Mervine
committed
adding verbose connection lifetime output to the correct location
1 parent c95f4e1 commit 697dbfa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/stat/basic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ conn_destroyed(Event_Type et, Object * obj, Any_Type reg_arg, Any_Type c_arg)
228228

229229
if (s->basic.num_calls_completed > 0) {
230230
lifetime = timer_now() - s->basic.time_connect_start;
231+
if (verbose > 0)
232+
fprintf (stdout, "Connection lifetime = %-8.2f\n", lifetime*1000);
233+
231234
basic.conn_lifetime_sum += lifetime;
232235
basic.conn_lifetime_sum2 += SQUARE(lifetime);
233236
if (lifetime < basic.conn_lifetime_min)

src/stat/sess_stat.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ sess_destroyed (Event_Type et, Object *obj, Any_Type regarg, Any_Type callarg)
148148
st.num_conns += priv->num_conns;
149149
++st.num_completed_since_last_sample;
150150
++st.num_completed;
151-
if (verbose)
152-
printf("Connection lifetime = %-8.1f\n", delta);
153151
st.lifetime_sum += delta;
154152
}
155153

0 commit comments

Comments
 (0)