Skip to content

Commit

Permalink
feat: create table add speed
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed May 29, 2024
1 parent f3ee2a1 commit b105aa3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/benchInsert.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,9 +956,9 @@ static void *createTable(void *sarg) {
batchNum = 0;
uint64_t currentPrintTime = toolsGetTimestampMs();
if (currentPrintTime - lastPrintTime > PRINT_STAT_INTERVAL) {
float rate = (pThreadInfo->tables_created - lastTotalCreate) * 1000 / (currentPrintTime - lastPrintTime);
infoPrint("thread[%d] already created %" PRId64 " tables, peroid rate: %.0f tables/s\n",
pThreadInfo->threadID, pThreadInfo->tables_created, rate);
float speed = (pThreadInfo->tables_created - lastTotalCreate) * 1000 / (currentPrintTime - lastPrintTime);
infoPrint("thread[%d] already created %" PRId64 " tables, peroid speed: %.0f tables/s\n",
pThreadInfo->threadID, pThreadInfo->tables_created, speed);
lastPrintTime = currentPrintTime;
lastTotalCreate = pThreadInfo->tables_created;
}
Expand Down Expand Up @@ -1123,7 +1123,7 @@ static int createChildTables() {
double end = (double)toolsGetTimestampMs();
succPrint(
"Spent %.4f seconds to create %" PRId64
" table(s) with %d thread(s) rate: %.0f tables/s, already exist %" PRId64
" table(s) with %d thread(s) speed: %.0f tables/s, already exist %" PRId64
" table(s), actual %" PRId64 " table(s) pre created, %" PRId64
" table(s) will be auto created\n",
(end - start) / 1000.0,
Expand Down

0 comments on commit b105aa3

Please sign in to comment.