-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(gnovm): gno test
now has gas used information
#2571
base: master
Are you sure you want to change the base?
feat(gnovm): gno test
now has gas used information
#2571
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2571 +/- ##
=======================================
Coverage 60.44% 60.44%
=======================================
Files 563 563
Lines 75159 75172 +13
=======================================
+ Hits 45431 45441 +10
- Misses 26341 26344 +3
Partials 3387 3387
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
If the gas used for each test case is displayed, that would be great :) |
And it would be even better if we displayed both the execution time and the gas used :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea. Some style comments and also -- are also those lines supposed to commented out?
gnovm/cmd/gno/test.go
Outdated
@@ -205,7 +206,7 @@ func execTest(cfg *testCfg, args []string, io commands.IO) error { | |||
io.ErrPrintfln("FAIL") | |||
testErrCount++ | |||
} else { | |||
io.ErrPrintfln("ok %s \t%s", pkg.Dir, dstr) | |||
io.ErrPrintfln("ok %s \ttotal gas used: %d", pkg.Dir, gasUsed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we have both gas used and duration? Both seem useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that people are not often concern about that time so much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll ask in another way -- how do we benefit from removing it? If someone doesn't care about it then they don't have to use it. If someone does care about it then they have it. It's only a few more characters being printed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deelawn
I am fine with keeping the duration to be displayed.
But I have another view, should we move duration to -print-runtime-metrics
which currently displaying runtime: cycle=%s imports=%d allocs=%s
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before these changes, only subpackage level test execution displayed duration. The runtime metrics are something different. I'm only suggesting that we don't remove existing functionality if there is no good reason to do so. I don't think duration needs to be added anywhere else it doesn't currently exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5a85bec
to
0cc91ce
Compare
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the descriptionWhy do we have this PR?
After discussion in #2467 and #2149 that the
gno test
now has gas used information instead of execution time.Target:
gno test
hastotal gas used
informationgno test
hasgas used
for each xxx_filetest.gnoI will
add realm storage diff size
#2468 in another PR.