13 const char* h1 =
" ----- ----- ------- ----- ----- | ---- ----- --------- --------- --------- |";
14 const char* h2 =
" mn it mx it avg it its ttits | ss ts st stps stpit |";
17 log_msg(NULL, 3, 0,
"%s error: Could not open file %s in %s. Turning off logging.\n",
42 float stm = tstm/this->
solves;
45 float itm = its?tstm/its:0.;
51 snprintf(itbuf,
sizeof itbuf,
"%5d %5d %7.1f %6d %6d",
54 snprintf(stbuf,
sizeof stbuf,
"%4d %5d %9.4f %9.4f %9.4f",this->
solves,this->
totsolves,
57 unsigned char flag = cflg?
ECHO : 0;
64 this->lastSlvtime = this->
slvtime;
69 if (curiter >
max)
max = curiter;
70 if (curiter <
min)
min = curiter;
79 const char* h1 =
" ----- ----- | --------- --------- |";
80 const char* h2 =
" cls ttcls | time tot time |";
83 log_msg(NULL, 3, 0,
"%s error: Could not open file %s in %s. Turning off logging.\n",
99 float ctm = this->tot_time - this->last_tot_time;
100 this->tot_calls += this->calls;
102 snprintf(cbuf,
sizeof cbuf,
"%5d %5d", this->calls, this->tot_calls);
103 snprintf(tbuf,
sizeof tbuf,
"%9.4f %9.4f", ctm, this->tot_time);
105 unsigned char flag = cflg?
ECHO : 0;
108 this->last_tot_time = this->tot_time;
int totsolves
total # of solutions
void log_stats(double tm, bool cflg)
void init_logger(const char *filename)
FILE_SPEC logger
file in which to write stats
int solves
#solutions performed
void init_logger(const char *filename)
double lastSlvtime
total solver time
int min
minimum #interations
int last_tot
previous total #
void log_stats(double tm, bool cflg)
void update_iter(const int curiter)
void log_msg(FILE_SPEC out, int level, unsigned char flag, const char *fmt,...)
double slvtime
total solver time
int max
maximum #iterations
FILE_SPEC f_open(const char *fname, const char *mode)
Open a FILE_SPEC.