File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
features/frameworks/greentea-client/source Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ static char buf[128];
39
39
static SingletonPtr<CircularBuffer<thread_info_t , THREAD_BUF_COUNT> > queue;
40
40
#endif
41
41
42
+ #if defined(MBED_CPU_STATS_ENABLED)
43
+ static void send_CPU_info (void );
44
+ #endif
45
+
42
46
static void send_heap_info (void );
43
47
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
44
48
static void send_stack_info (void );
@@ -65,7 +69,23 @@ void greentea_metrics_report()
65
69
send_stack_info ();
66
70
Thread::attach_terminate_hook (NULL );
67
71
#endif
72
+ #if defined(MBED_CPU_STATS_ENABLED)
73
+ send_CPU_info ();
74
+ #endif
75
+ }
76
+
77
+ #if defined(MBED_CPU_STATS_ENABLED)
78
+ static void send_CPU_info ()
79
+ {
80
+ mbed_stats_cpu_t stats;
81
+ mbed_stats_cpu_get (&stats);
82
+
83
+ greentea_send_kv (" __cpu_info up time" , stats.uptime );
84
+ greentea_send_kv (" __cpu_info sleep time" , stats.sleep_time );
85
+ greentea_send_kv (" __cpu_info deepsleep time" , stats.deep_sleep_time );
86
+ greentea_send_kv (" __cpu_info % sleep/deep" , (stats.sleep_time * 100 ) / stats.uptime , (stats.deep_sleep_time * 100 ) / stats.uptime );
68
87
}
88
+ #endif
69
89
70
90
static void send_heap_info ()
71
91
{
You can’t perform that action at this time.
0 commit comments