Skip to content

Commit 79d92f1

Browse files
author
root
committed
added start time to trx.out
1 parent bb8db5b commit 79d92f1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/neword.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ int neword( int t_num,
9696
int ol_num_seq[MAX_NUM_ITEMS];
9797

9898
int proceed = 0;
99-
struct timespec tbuf1;
100-
clock_t clk1;
99+
struct timespec tbuf1,tbuf_start;
100+
clock_t clk1,clk_start;
101101

102102

103103
MYSQL_STMT* mysql_stmt;
@@ -110,6 +110,7 @@ int neword( int t_num,
110110
/*EXEC SQL CONTEXT USE :ctx[t_num];*/
111111

112112
gettimestamp(datetime, STRFTIME_FORMAT, TIMESTAMP_LEN);
113+
clk_start = clock_gettime(CLOCK_REALTIME, &tbuf_start );
113114

114115
proceed = 1;
115116
/*EXEC_SQL SELECT c_discount, c_last, c_credit, w_tax
@@ -504,7 +505,8 @@ int neword( int t_num,
504505
if( mysql_commit(ctx[t_num]) ) goto sqlerr;
505506
clk1 = clock_gettime(CLOCK_REALTIME, &tbuf1 );
506507
if (ftrx_file) {
507-
fprintf(ftrx_file,"t_num: %d finish: %lu %lu start: %s\n",t_num, tbuf1.tv_sec, tbuf1.tv_nsec,datetime);
508+
fprintf(ftrx_file,"t_num: %d finish: %lu %lu start: %lu %lu\n",t_num, tbuf1.tv_sec, tbuf1.tv_nsec,
509+
tbuf_start.tv_sec, tbuf_start.tv_nsec);
508510
}
509511

510512
return (1);

0 commit comments

Comments
 (0)