Skip to content

Fix logger.time() not returning accurate timings#532

Merged
TwitchBronBron merged 2 commits intorokucommunity:masterfrom
luis-j-soares:fix/incorrect-logger-time
Mar 8, 2022
Merged

Fix logger.time() not returning accurate timings#532
TwitchBronBron merged 2 commits intorokucommunity:masterfrom
luis-j-soares:fix/incorrect-logger-time

Conversation

@luis-j-soares
Copy link
Collaborator

@luis-j-soares luis-j-soares commented Mar 5, 2022

While diagnosing why the compiler is taking so long in our project, we noticed that the reported time is not correct.

image-before

After debugging a bit, I found that stopwatch.stop() was called right after action(...), which doesn't work for async methods (which "Parsing files"/loadAllFilesAST is).

Moving the stop inside the done callback seems to do the trick.

image-after

@TwitchBronBron
Copy link
Member

Oh, good catch!

@TwitchBronBron TwitchBronBron merged commit aca8b59 into rokucommunity:master Mar 8, 2022
@luis-j-soares luis-j-soares deleted the fix/incorrect-logger-time branch March 8, 2022 15:32
@TwitchBronBron
Copy link
Member

@luis-soares-sky this was included in release v0.45.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants