Home
last modified time | relevance | path

Searched refs:stats (Results 1 – 25 of 133) sorted by relevance

123456

/Zephyr-latest/tests/net/conn_mgr_monitor/src/
Dmain.c287 struct test_stats stats; in cycle_ready_ifaces() local
295 stats = get_reset_stats(); in cycle_ready_ifaces()
296 zassert_equal(stats.event_count_gen, 0, in cycle_ready_ifaces()
304 stats = get_reset_stats(); in cycle_ready_ifaces()
305 zassert_equal(stats.conn_count_gen, 1, in cycle_ready_ifaces()
307 zassert_equal(stats.event_count_gen, 1, in cycle_ready_ifaces()
309 zassert_equal(stats.conn_iface_gen, ifa, "ifa should be blamed."); in cycle_ready_ifaces()
316 stats = get_reset_stats(); in cycle_ready_ifaces()
317 zassert_equal(stats.event_count_gen, 0, in cycle_ready_ifaces()
325 stats = get_reset_stats(); in cycle_ready_ifaces()
[all …]
/Zephyr-latest/tests/lib/mem_blocks_stats/src/
Dmain.c21 struct sys_memory_stats stats; in ZTEST() local
29 status = sys_mem_blocks_runtime_stats_get(NULL, &stats); in ZTEST()
49 struct sys_memory_stats stats; in ZTEST() local
55 status = sys_mem_blocks_runtime_stats_get(&mem_block_01, &stats); in ZTEST()
58 zassert_equal(stats.free_bytes, BLK_SZ * NUM_BLOCKS, in ZTEST()
60 BLK_SZ * NUM_BLOCKS, stats.free_bytes); in ZTEST()
61 zassert_equal(stats.allocated_bytes, 0, in ZTEST()
63 stats.allocated_bytes); in ZTEST()
64 zassert_equal(stats.max_allocated_bytes, 0, in ZTEST()
66 stats.max_allocated_bytes); in ZTEST()
[all …]
/Zephyr-latest/tests/kernel/mem_slab/mslab_stats/src/
Dmain.c17 struct sys_memory_stats stats; in ZTEST() local
25 status = k_mem_slab_runtime_stats_get(NULL, &stats); in ZTEST()
45 struct sys_memory_stats stats; in ZTEST() local
51 status = k_mem_slab_runtime_stats_get(&kmslab, &stats); in ZTEST()
54 zassert_equal(stats.free_bytes, BLK_SZ * NUM_BLOCKS, in ZTEST()
56 BLK_SZ * NUM_BLOCKS, stats.free_bytes); in ZTEST()
57 zassert_equal(stats.allocated_bytes, 0, in ZTEST()
59 stats.allocated_bytes); in ZTEST()
60 zassert_equal(stats.max_allocated_bytes, 0, in ZTEST()
62 stats.max_allocated_bytes); in ZTEST()
[all …]
/Zephyr-latest/subsys/net/l2/ethernet/
Deth_stats.h22 struct net_stats_eth *stats; in eth_stats_update_bytes_rx() local
28 stats = api->get_stats(net_if_get_device(iface)); in eth_stats_update_bytes_rx()
29 if (!stats) { in eth_stats_update_bytes_rx()
33 stats->bytes.received += bytes; in eth_stats_update_bytes_rx()
41 struct net_stats_eth *stats; in eth_stats_update_bytes_tx() local
47 stats = api->get_stats(net_if_get_device(iface)); in eth_stats_update_bytes_tx()
48 if (!stats) { in eth_stats_update_bytes_tx()
52 stats->bytes.sent += bytes; in eth_stats_update_bytes_tx()
59 struct net_stats_eth *stats; in eth_stats_update_pkts_rx() local
65 stats = api->get_stats(net_if_get_device(iface)); in eth_stats_update_pkts_rx()
[all …]
/Zephyr-latest/subsys/net/l2/ppp/
Dppp_stats.h21 struct net_stats_ppp *stats; in ppp_stats_update_bytes_rx() local
27 stats = api->get_stats(net_if_get_device(iface)); in ppp_stats_update_bytes_rx()
28 if (!stats) { in ppp_stats_update_bytes_rx()
32 stats->bytes.received += bytes; in ppp_stats_update_bytes_rx()
40 struct net_stats_ppp *stats; in ppp_stats_update_bytes_tx() local
46 stats = api->get_stats(net_if_get_device(iface)); in ppp_stats_update_bytes_tx()
47 if (!stats) { in ppp_stats_update_bytes_tx()
51 stats->bytes.sent += bytes; in ppp_stats_update_bytes_tx()
58 struct net_stats_ppp *stats; in ppp_stats_update_pkts_rx() local
64 stats = api->get_stats(net_if_get_device(iface)); in ppp_stats_update_pkts_rx()
[all …]
/Zephyr-latest/samples/basic/hash_map/src/
Dmain.c25 static void print_stats(const struct _stats *stats);
32 struct _stats stats = {0}; in main() local
45 ++stats.n_insert; in main()
46 ++stats.max_size; in main()
55 for (i = 0; i < stats.max_size; ++i) { in main()
57 ires = sys_hashmap_insert(&map, i, stats.max_size - i, NULL); in main()
59 ++stats.n_replace; in main()
68 for (i = stats.max_size; i > 0; --i) { in main()
71 ++stats.n_remove; in main()
84 print_stats(&stats); in main()
[all …]
/Zephyr-latest/tests/drivers/mm/sys_mm_drv_bank/src/
Dmain.c17 struct sys_memory_stats *stats, in test_stats() argument
20 zassert_equal(stats->free_bytes, expected->free_bytes, in test_stats()
22 stats->free_bytes, expected->free_bytes); in test_stats()
23 zassert_equal(stats->allocated_bytes, expected->allocated_bytes, in test_stats()
25 stats->allocated_bytes, expected->allocated_bytes); in test_stats()
26 zassert_equal(stats->max_allocated_bytes, expected->max_allocated_bytes, in test_stats()
28 stats->max_allocated_bytes, in test_stats()
34 struct sys_memory_stats stats; in ZTEST() local
45 sys_mm_drv_bank_stats_get(&bank_data, &stats); in ZTEST()
46 test_stats("MM Bank Init Error", &stats, &expected); in ZTEST()
[all …]
/Zephyr-latest/subsys/net/ip/
Dnet_stats.h22 #define GET_STAT(iface, s) (iface ? iface->stats.s : net_stats.s)
23 #define GET_STAT_ADDR(iface, s) (iface ? &iface->stats.s : &net_stats.s)
38 UPDATE_STAT(iface, stats.processing_error++); in net_stats_update_processing_error()
43 UPDATE_STAT(iface, stats.ip_errors.protoerr++); in net_stats_update_ip_errors_protoerr()
48 UPDATE_STAT(iface, stats.ip_errors.vhlerr++); in net_stats_update_ip_errors_vhlerr()
54 UPDATE_STAT(iface, stats.bytes.received += bytes); in net_stats_update_bytes_recv()
60 UPDATE_STAT(iface, stats.bytes.sent += bytes); in net_stats_update_bytes_sent()
75 UPDATE_STAT(iface, stats.ipv6.sent++); in net_stats_update_ipv6_sent()
80 UPDATE_STAT(iface, stats.ipv6.recv++); in net_stats_update_ipv6_recv()
85 UPDATE_STAT(iface, stats.ipv6.drop++); in net_stats_update_ipv6_drop()
[all …]
/Zephyr-latest/kernel/
Dusage.c122 void z_sched_cpu_usage(uint8_t cpu_id, struct k_thread_runtime_stats *stats) in z_sched_cpu_usage() argument
151 stats->total_cycles = cpu->usage->total; in z_sched_cpu_usage()
153 stats->current_cycles = cpu->usage->current; in z_sched_cpu_usage()
154 stats->peak_cycles = cpu->usage->longest; in z_sched_cpu_usage()
157 stats->average_cycles = 0; in z_sched_cpu_usage()
159 stats->average_cycles = stats->total_cycles / in z_sched_cpu_usage()
164 stats->idle_cycles = in z_sched_cpu_usage()
167 stats->execution_cycles = stats->total_cycles + stats->idle_cycles; in z_sched_cpu_usage()
174 struct k_thread_runtime_stats *stats) in z_sched_thread_usage() argument
203 stats->execution_cycles = thread->base.usage.total; in z_sched_thread_usage()
[all …]
Dobj_core.c30 obj_core->stats = NULL; in k_obj_core_init()
125 int k_obj_core_stats_register(struct k_obj_core *obj_core, void *stats, in k_obj_core_stats_register() argument
138 obj_core->stats = stats; in k_obj_core_stats_register()
156 obj_core->stats = NULL; in k_obj_core_stats_deregister()
165 int k_obj_core_stats_raw(struct k_obj_core *obj_core, void *stats, in k_obj_core_stats_raw() argument
177 } else if ((desc->raw_size != stats_len) || (obj_core->stats == NULL)) { in k_obj_core_stats_raw()
184 rv = desc->raw(obj_core, stats); in k_obj_core_stats_raw()
192 int k_obj_core_stats_query(struct k_obj_core *obj_core, void *stats, in k_obj_core_stats_query() argument
204 } else if ((desc->query_size != stats_len) || (obj_core->stats == NULL)) { in k_obj_core_stats_query()
211 rv = desc->query(obj_core, stats); in k_obj_core_stats_query()
[all …]
/Zephyr-latest/kernel/paging/
Dstatistics.c91 void z_impl_k_mem_paging_stats_get(struct k_mem_paging_stats_t *stats) in z_impl_k_mem_paging_stats_get() argument
93 if (stats == NULL) { in z_impl_k_mem_paging_stats_get()
98 memcpy(stats, &paging_stats, sizeof(paging_stats)); in z_impl_k_mem_paging_stats_get()
103 void z_vrfy_k_mem_paging_stats_get(struct k_mem_paging_stats_t *stats) in z_vrfy_k_mem_paging_stats_get() argument
105 K_OOPS(K_SYSCALL_MEMORY_WRITE(stats, sizeof(*stats))); in z_vrfy_k_mem_paging_stats_get()
106 z_impl_k_mem_paging_stats_get(stats); in z_vrfy_k_mem_paging_stats_get()
113 struct k_mem_paging_stats_t *stats) in z_impl_k_mem_paging_thread_stats_get() argument
115 if ((thread == NULL) || (stats == NULL)) { in z_impl_k_mem_paging_thread_stats_get()
120 memcpy(stats, &thread->paging_stats, sizeof(thread->paging_stats)); in z_impl_k_mem_paging_thread_stats_get()
126 struct k_mem_paging_stats_t *stats) in z_vrfy_k_mem_paging_thread_stats_get() argument
[all …]
/Zephyr-latest/tests/kernel/mem_protect/demand_paging/mem_map/src/
Dmain.c99 static void print_paging_stats(struct k_mem_paging_stats_t *stats, const char *scope) in print_paging_stats() argument
102 printk(" - Total: %lu\n", stats->pagefaults.cnt); in print_paging_stats()
103 printk(" - IRQ locked: %lu\n", stats->pagefaults.irq_locked); in print_paging_stats()
104 printk(" - IRQ unlocked: %lu\n", stats->pagefaults.irq_unlocked); in print_paging_stats()
106 printk(" - in ISR: %lu\n", stats->pagefaults.in_isr); in print_paging_stats()
111 stats->eviction.clean + stats->eviction.dirty); in print_paging_stats()
113 stats->eviction.clean); in print_paging_stats()
115 stats->eviction.dirty); in print_paging_stats()
123 struct k_mem_paging_stats_t stats; in touch_anon_pages() local
162 k_mem_paging_stats_get(&stats); in touch_anon_pages()
[all …]
/Zephyr-latest/subsys/net/lib/shell/
Dmem.c161 STRUCT_SECTION_FOREACH(net_pkt_alloc_stats_slab, stats) { in cmd_net_mem()
162 if (stats->ok.count) { in cmd_net_mem()
163 PR("%p\tOK \t%u\t%llu\t\t%llu\n", stats->slab, stats->ok.count, in cmd_net_mem()
164 stats->ok.alloc_sum / (uint64_t)stats->ok.count, in cmd_net_mem()
165 k_cyc_to_us_ceil64(stats->ok.time_sum / in cmd_net_mem()
166 (uint64_t)stats->ok.count)); in cmd_net_mem()
169 if (stats->fail.count) { in cmd_net_mem()
170 PR("%p\tFAIL\t%u\t%llu\t\t%llu\n", stats->slab, stats->fail.count, in cmd_net_mem()
171 stats->fail.alloc_sum / (uint64_t)stats->fail.count, in cmd_net_mem()
172 k_cyc_to_us_ceil64(stats->fail.time_sum / in cmd_net_mem()
[all …]
/Zephyr-latest/lib/heap/
Dheap_stats.c12 struct sys_memory_stats *stats) in sys_heap_runtime_stats_get() argument
14 if ((heap == NULL) || (stats == NULL)) { in sys_heap_runtime_stats_get()
18 stats->free_bytes = heap->heap->free_bytes; in sys_heap_runtime_stats_get()
19 stats->allocated_bytes = heap->heap->allocated_bytes; in sys_heap_runtime_stats_get()
20 stats->max_allocated_bytes = heap->heap->max_allocated_bytes; in sys_heap_runtime_stats_get()
/Zephyr-latest/samples/basic/sys_heap/src/
Dmain.c39 struct sys_memory_stats stats; in print_sys_memory_stats() local
41 sys_heap_runtime_stats_get(&heap, &stats); in print_sys_memory_stats()
44 stats.allocated_bytes, stats.free_bytes, in print_sys_memory_stats()
45 stats.max_allocated_bytes, HEAP_SIZE); in print_sys_memory_stats()
/Zephyr-latest/subsys/shell/modules/kernel_service/
Dheap.c21 struct sys_memory_stats stats; in cmd_kernel_heap() local
23 err = sys_heap_runtime_stats_get(&_system_heap, &stats); in cmd_kernel_heap()
29 shell_print(sh, "free: %zu", stats.free_bytes); in cmd_kernel_heap()
30 shell_print(sh, "allocated: %zu", stats.allocated_bytes); in cmd_kernel_heap()
31 shell_print(sh, "max. allocated: %zu", stats.max_allocated_bytes); in cmd_kernel_heap()
/Zephyr-latest/include/zephyr/kernel/
Dobj_core.h97 int (*raw)(struct k_obj_core *obj_core, void *stats);
99 int (*query)(struct k_obj_core *obj_core, void *stats);
125 void *stats; /**< Pointer to kernel object's stats */ member
279 void *stats) in k_obj_core_stats_init() argument
281 obj_core->stats = stats; in k_obj_core_stats_init()
299 int k_obj_core_stats_register(struct k_obj_core *obj_core, void *stats,
331 int k_obj_core_stats_raw(struct k_obj_core *obj_core, void *stats,
350 int k_obj_core_stats_query(struct k_obj_core *obj_core, void *stats,
/Zephyr-latest/include/zephyr/net/
Dnet_stats.h929 &(iface)->stats.ipv6.sent); \
936 &(iface)->stats.ipv6.recv); \
943 &(iface)->stats.ipv6.drop); \
950 &(iface)->stats.ipv6.forwarded)
964 &(iface)->stats.ipv4.sent); \
971 &(iface)->stats.ipv4.recv); \
978 &(iface)->stats.ipv4.drop); \
985 &(iface)->stats.ipv4.forwarded)
999 &(iface)->stats.icmp.sent); \
1006 &(iface)->stats.icmp.recv); \
[all …]
/Zephyr-latest/subsys/pm/
Dpm_stats.c27 static STATS_SECT_DECL(pm_stats) stats[CONFIG_MP_MAX_NUM_CPUS][PM_STATE_COUNT];
43 stats_init(&(stats[i][j].s_hdr), STATS_SIZE_32, 3U, in pm_stats_init()
45 stats_register(names[i][j], &(stats[i][j].s_hdr)); in pm_stats_init()
69 STATS_INC(stats[cpu][state], state_count); in pm_stats_update()
70 STATS_INCN(stats[cpu][state], state_total_cycles, time_total); in pm_stats_update()
71 STATS_SET(stats[cpu][state], state_last_cycles, time_total); in pm_stats_update()
/Zephyr-latest/tests/kernel/timer/timer_behavior/pytest/
Dtest_timer.py14 def do_analysis(test, stats, stats_count, config, sys_clock_hw_cycles_per_sec): argument
46 time_diff = stats['total_time'] - seconds - expected_total_drift
61 ', '.join(['"{}_us":{:.6f}'.format(k, v * 1_000_000) for k,v in stats.items()]) +
81 assert stats['stddev'] < max_stddev
82 assert stats['min'] >= min_bound
83 assert stats['max'] <= max_bound
102 stats, stats_count = tool.run(seconds, tool_options)
104 do_analysis(test, stats, stats_count, config, sys_clock_hw_cycles_per_sec)
/Zephyr-latest/drivers/mm/
Dmm_drv_bank.c46 struct sys_memory_stats *stats) in sys_mm_drv_bank_stats_get() argument
48 stats->free_bytes = bank->unmapped_pages * in sys_mm_drv_bank_stats_get()
50 stats->allocated_bytes = bank->mapped_pages * in sys_mm_drv_bank_stats_get()
52 stats->max_allocated_bytes = bank->max_mapped_pages * in sys_mm_drv_bank_stats_get()
/Zephyr-latest/samples/kernel/metairq_dispatch/src/
Dmain.c41 } stats; variable
130 int lidx = stats.threads[t].nevt++; in record_latencies()
132 if (lidx < ARRAY_SIZE(stats.threads[t].latencies)) { in record_latencies()
133 stats.threads[t].latencies[lidx] = latency; in record_latencies()
136 stats.mirq_latencies[atomic_inc(&stats.num_mirq)] = m->metairq_latency; in record_latencies()
151 calc_stats(stats.mirq_latencies, stats.num_mirq, in record_latencies()
160 if (stats.threads[i].nevt == 0) { in record_latencies()
165 calc_stats(stats.threads[i].latencies, in record_latencies()
166 stats.threads[i].nevt, in record_latencies()
/Zephyr-latest/drivers/wifi/esp32/src/
Desp_wifi_drv.c70 struct net_stats_wifi stats; member
109 data->stats.bytes.sent += pkt_len; in esp32_wifi_send()
110 data->stats.pkts.tx++; in esp32_wifi_send()
120 data->stats.errors.tx++; in esp32_wifi_send()
153 esp32_data.stats.bytes.received += len; in eth_esp32_rx()
154 esp32_data.stats.pkts.rx++; in eth_esp32_rx()
165 esp32_data.stats.errors.rx++; in eth_esp32_rx()
200 esp32_ap_sta_data.stats.bytes.received += len; in wifi_esp32_ap_iface_rx()
201 esp32_ap_sta_data.stats.pkts.rx++; in wifi_esp32_ap_iface_rx()
212 esp32_ap_sta_data.stats.errors.rx++; in wifi_esp32_ap_iface_rx()
[all …]
/Zephyr-latest/subsys/testsuite/ztest/src/
Dztest.c686 k_thread_access_grant(&ztest_thread, suite, test, suite->stats); in run_test()
714 if (tc_spend_time > test->stats->duration_worst_ms) { in run_test()
715 test->stats->duration_worst_ms = tc_spend_time; in run_test()
858 test->stats->run_count++; in z_ztest_run_test_suite_ptr()
861 test->stats->pass_count++; in z_ztest_run_test_suite_ptr()
863 test->stats->skip_count++; in z_ztest_run_test_suite_ptr()
865 test->stats->fail_count++; in z_ztest_run_test_suite_ptr()
879 test->stats->run_count++; in z_ztest_run_test_suite_ptr()
882 test->stats->pass_count++; in z_ztest_run_test_suite_ptr()
884 test->stats->skip_count++; in z_ztest_run_test_suite_ptr()
[all …]
/Zephyr-latest/drivers/wifi/infineon/
Dairoc_wifi.c322 data->stats.errors.tx++; in airoc_mgmt_send()
328 data->stats.bytes.sent += pkt_len; in airoc_mgmt_send()
329 data->stats.pkts.tx++; in airoc_mgmt_send()
365 airoc_wifi_data.stats.bytes.received += len; in airoc_wifi_network_process_ethernet_data()
366 airoc_wifi_data.stats.pkts.rx++; in airoc_wifi_network_process_ethernet_data()
372 airoc_wifi_data.stats.errors.rx++; in airoc_wifi_network_process_ethernet_data()
711 static int airoc_mgmt_wifi_stats(const struct device *dev, struct net_stats_wifi *stats) in airoc_mgmt_wifi_stats() argument
715 stats->bytes.received = data->stats.bytes.received; in airoc_mgmt_wifi_stats()
716 stats->bytes.sent = data->stats.bytes.sent; in airoc_mgmt_wifi_stats()
717 stats->pkts.rx = data->stats.pkts.rx; in airoc_mgmt_wifi_stats()
[all …]

123456