Skip to content

Commit 6e49cf0

Browse files
author
Ben Asher
committed
Log debug elapsed time using 3 decimal places
For flags like -debug-time-function-bodies, this makes it easier to measure the impact of parsing functions that take a short amount of time to parse (less than 0.1ms) but are parsed many times and therefore add up over the course of the full build.
1 parent eb8bea9 commit 6e49cf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckStmt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ namespace {
155155
ASTContext &ctx = Function.getAsDeclContext()->getASTContext();
156156

157157
if (ShouldDump) {
158-
llvm::errs() << llvm::format("%0.1f", elapsed * 1000) << "ms\t";
158+
llvm::errs() << llvm::format("%0.3f", elapsed * 1000) << "ms\t";
159159
Function.getLoc().print(llvm::errs(), ctx.SourceMgr);
160160

161161
if (auto *AFD = Function.getAbstractFunctionDecl()) {

0 commit comments

Comments
 (0)