Skip to content

Commit

Permalink
print timings by default
Browse files Browse the repository at this point in the history
  • Loading branch information
anon committed May 31, 2023
1 parent d58e486 commit 3edaf6b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -796,9 +796,7 @@ int main(int argc, char **argv)
{"prompt", llama.params.prompt},
{"stopping_word", llama.stopping_word}};

if (llama.verbose) {
llama_print_timings(llama.ctx);
}
llama_print_timings(llama.ctx);

return res.set_content(
data.dump(llama.json_indent, ' ', false, json::error_handler_t::replace),
Expand Down Expand Up @@ -870,16 +868,13 @@ int main(int argc, char **argv)
if (!sink.write(str.data(), str.size())) {
if (llama.verbose) {
fprintf(stderr, "stream closed\n");
llama_print_timings(llama.ctx);
}
llama_print_timings(llama.ctx);
return false;
}
}

if (llama.verbose) {
llama_print_timings(llama.ctx);
}

llama_print_timings(llama.ctx);
sink.done();
return true;
};
Expand Down

0 comments on commit 3edaf6b

Please sign in to comment.