From 8be7a3ca8192c2c45528acbf9fdf7f7bf63c36b0 Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Tue, 9 Aug 2016 16:26:13 +0200 Subject: [PATCH] manually merged from 2.2.3 - remove time measurement, total execution time will be shown after ctest execution --- unittest/libmariadb/performance.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/unittest/libmariadb/performance.c b/unittest/libmariadb/performance.c index 102fae0c..24c6334e 100644 --- a/unittest/libmariadb/performance.c +++ b/unittest/libmariadb/performance.c @@ -23,20 +23,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "my_test.h" #include "ma_common.h" -void show_time(struct timeval t1) -{ - struct timeval t2; - double elapsed; - gettimeofday(&t2, NULL); - elapsed = ((t2.tv_sec - t1.tv_sec)* 1000.0 + (t2.tv_usec - t1.tv_usec) / 1000.0) / 1000; - diag("elapsed: %5.2f", elapsed); -} - static int perf1(MYSQL *mysql) { int rc; MYSQL_STMT *stmt; - struct timeval t1; char *stmtstr= "SELECT s.emp_no, s.salary, e.emp_no, e.first_name, e.last_name, e.gender FROM salaries s, employees e WHERE s.emp_no = e.emp_no"; rc= mysql_select_db(mysql, "employees"); @@ -49,27 +39,19 @@ static int perf1(MYSQL *mysql) stmt= mysql_stmt_init(mysql); diag("prepare"); - gettimeofday(&t1, NULL); rc= mysql_stmt_prepare(stmt, stmtstr, strlen(stmtstr)); check_stmt_rc(rc, stmt); - show_time(t1); diag("execute"); - gettimeofday(&t1, NULL); rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); - show_time(t1); diag("store"); - gettimeofday(&t1, NULL); rc= mysql_stmt_store_result(stmt); check_stmt_rc(rc, stmt); - show_time(t1); diag("fetch"); - gettimeofday(&t1, NULL); while (!mysql_stmt_fetch(stmt)); - show_time(t1); mysql_stmt_close(stmt); return OK;