Commit 224b63e3 authored by unknown's avatar unknown

Incorporate a patch to write a timestamp for every new line of the test that is executed.

This makes it possible make a graph (with for example gnuplot) of a test run and spot where most time is consumed.
Add the new code inside an "#if 0" until it's portable. 


client/mysqltest.c:
  Incorporate a patch to write a timestamp for every new line of the test that is executed.
  This makes it possible make a graph (with for example gnuplot) of a test run and spot where most time is consumed.
parent 6d5997b0
......@@ -4501,6 +4501,35 @@ static void init_var_hash(MYSQL *mysql)
DBUG_VOID_RETURN;
}
static void mark_progress(int line)
{
#if 0
static FILE* fp = NULL;
static double first;
struct timeval tv;
double now;
if (!fp)
{
fp = fopen("/tmp/mysqltest_progress.log", "wt");
if (!fp)
{
abort();
}
gettimeofday(&tv, NULL);
first = tv.tv_sec * 1e6 + tv.tv_usec;
}
gettimeofday(&tv, NULL);
now = tv.tv_sec * 1e6 + tv.tv_usec;
fprintf(fp, "%d %f\n", parser.current_line, (now - first) / 1e6);
#endif
}
int main(int argc, char **argv)
{
......@@ -4851,6 +4880,7 @@ int main(int argc, char **argv)
}
parser.current_line += current_line_inc;
mark_progress(parser.current_line);
}
start_lineno= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment