Skip to content

Commit

Permalink
Fix bug in logging (counting updates)
Browse files Browse the repository at this point in the history
  • Loading branch information
karel-brinda committed Aug 29, 2016
1 parent 30a0f75 commit 9c77f6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CXX ?= g++
CXXFLAGS = -std=c++11 -Wall -Wextra -Wno-missing-field-initializers -Wshadow -g -O2
CXXFLAGS = -std=c++11 -Wall -Wextra -Wno-missing-field-initializers -g -O2
LIBS = -lm -lz -lpthread

PREFIX = $(DESTDIR)/usr/local
Expand Down
13 changes: 7 additions & 6 deletions src/caller.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,13 @@ void caller_t<T, counter_size, refbase_size>::run() {
break;
}

if (stats->params->log_file != nullptr) {
fprintf(stats->params->log_file,
"%" PRIu64 "\t%s\t%" PRIu64 "\n", i_read, rname,
stats->params->n_upd - n_upd0);
n_upd0 = stats->params->n_upd;
}
}

if (stats->params->log_file != nullptr) {
fprintf(stats->params->log_file,
"%" PRIu64 "\t%s\t%" PRIu64 "\n", i_read, rname,
stats->params->n_upd - n_upd0);
n_upd0 = stats->params->n_upd;
}

i_read += 1;
Expand Down

0 comments on commit 9c77f6d

Please sign in to comment.