Skip to content

Commit

Permalink
fixed bug in displaying time in query function
Browse files Browse the repository at this point in the history
  • Loading branch information
li0nbelenky committed Feb 23, 2022
1 parent 23fc12c commit a8fefbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/driver/mysql/MysqlQueryRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export class MysqlQueryRunner extends BaseQueryRunner implements QueryRunner {
const maxQueryExecutionTime = this.driver.connection.options.maxQueryExecutionTime;
const queryEndTime = +new Date();
const queryExecutionTime = queryEndTime - queryStartTime;
console.log(`Query took: ${queryEndTime.toString()} to run, Query body: ${query}`)
console.log(`Query took: ${(queryExecutionTime / 1000).toFixed(2)} to run, Query body: ${query}`)
if (maxQueryExecutionTime && queryExecutionTime > maxQueryExecutionTime)
this.driver.connection.logger.logQuerySlow(queryExecutionTime, query, parameters, this);

Expand Down

0 comments on commit a8fefbe

Please sign in to comment.