-
Notifications
You must be signed in to change notification settings - Fork 140
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
Expand interpreter tracing for composite, array and dictionary types #1450
Conversation
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit 3705ef1 Results
|
Codecov Report
@@ Coverage Diff @@
## master #1450 +/- ##
==========================================
+ Coverage 72.54% 73.02% +0.48%
==========================================
Files 288 288
Lines 39456 39719 +263
==========================================
+ Hits 28624 29006 +382
+ Misses 9376 9245 -131
- Partials 1456 1468 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Just realized: Tracing is disabled by default, so tests will not exercise any of this code. Could you please add this after https://github.com/onflow/cadence/blob/master/runtime/tests/interpreter/interpreter_test.go#L97-L97: interpreter.WithOnRecordTraceHandler(
func(
_ *interpreter.Interpreter,
_ string,
_ time.Duration,
_ []opentracing.LogRecord,
) {
// NO-OP
},
),
interpreter.WithTracingEnabled(true), |
Please follow and fill out the checklist, thank you |
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.
Looks good!
"github.com/onflow/cadence/runtime/tests/utils" | ||
) | ||
|
||
func setupInterpreterWithTracingCallBack( |
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.
👌
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.
Looks good, nice work!
Seems like some tests fail.
Should we also port this to 0.23? (the next Cadence release)
@ramtinms I looked at the failing tests. |
its not a must-have for 0.23, but would make our life easier if its backported. |
|
changes looks great, thanks for taking care of it |
@SupunS Could you please have a second look? |
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.
Looks good to me!
Co-authored-by: Supun Setunga <[email protected]>
Description
This PR expands tracing functionality inside cadence for composite, array and dictionary types. these open traces are disabled by default and upon enabling it, they would be passed to the interface's recordTrace method for further aggregation. These traces are great tools for analyzing the performance of the interpreter when handling these types.
master
branchFiles changed
in the Github PR explorer