-
Notifications
You must be signed in to change notification settings - Fork 43
Add total stack usage to memory matrix. #223
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
Conversation
mbed_greentea/mbed_report_api.py
Outdated
@@ -768,6 +770,10 @@ def exporter_memory_metrics_csv(test_result_ext, test_suite_properties=None): | |||
for test_suite_name in test_results: | |||
test = test_results[test_suite_name] | |||
|
|||
# If test didn't pass, memory stats doesn't make much sense | |||
if test['single_test_result'] != TEST_RESULT_OK: | |||
continue |
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.
@studavekar Seems like this is pretty harmless to leave in anyway right? Maybe the test failed due to a stack overflow...
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.
Yeah true that is good candidate where if test fails we would want the results of stack. However for failing tests the memory data can't be truly trusted. If test fails at init_xxx() the data reported by it would smaller. So for reporting we are ignoring the fail tests.
Can take out this check so we get data in either case.
a4c3532
to
43854de
Compare
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.
One little thing, but everything else looks good!
mbed_greentea/mbed_report_api.py
Outdated
@@ -17,6 +17,8 @@ | |||
Author: Przemyslaw Wirkus <[email protected]> | |||
""" | |||
|
|||
from mbed_test_api import TEST_RESULT_OK |
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.
One last nit pick! This line isn't necessary any more since you removed that last check. Mind pulling this out too?
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.
done
6523b8f
to
29a1cdc
Compare
This change adds total stack usage which is sum of max stack used by each thread.
29a1cdc
to
bb04c24
Compare
for cur_thread_stack_info in thread_stack_info: | ||
if cur_thread_stack_info['stack_size'] > max_thread_stack_size: | ||
max_thread_stack_size = cur_thread_stack_info['stack_size'] | ||
max_thread = cur_thread_stack_info | ||
|
||
max_stack_usage_total += cur_thread_stack_info['max_stack'] |
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.
updated it to correctly report max_stage_usage_total
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 great! Nice work!
This change adds total stack usage which is sum of max stack used by each
thread.