-
Notifications
You must be signed in to change notification settings - Fork 46
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
Implement CallProfiler #258
Conversation
|
||
void foo3() | ||
{ | ||
modmesh::USE_CALLPROFILER_PROFILE_THIS_FUNCTION(); |
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.
we use the macro here to insert the profiler.
The implementation is almost there. I will fix the CI once the proposal is accepted. |
foo3 - Total Time: 19 ms, Call Count: 1 | ||
)"; | ||
|
||
EXPECT_EQ(ss.str(), answer); |
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.
just for demonstration here, I think it's better to compare each node one by one.
Let me add comments after the feedback from @q40603 . But I would like the code review to happen after CI is clean. Fixing CI needs to change code, which requires additional review. It does not make sense to ask for review before making CI clean. modmesh CI includes linter. It wastes precious reviewing resources when the linter automatically tells you there are things needing to be fixed. |
I would like to have more discussion on this PR, let me close this one can create a new draft PR. |
This work is based on the previous #245
This work introduces a new profiler, called
CallProfiler
, which can print the profiling result of a hierarchical caller stack.The example output looks like this (please refer to
test_nopython_callprofiler.cpp
):cc @q40603