4.115
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Prints the Block Device Statistics |
---|
5 | * @ingroup rtems_blkdev Block Device Management |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * Copyright (c) 2012 embedded brains GmbH. All rights reserved. |
---|
10 | * |
---|
11 | * embedded brains GmbH |
---|
12 | * Obere Lagerstr. 30 |
---|
13 | * 82178 Puchheim |
---|
14 | * Germany |
---|
15 | * <rtems@embedded-brains.de> |
---|
16 | * |
---|
17 | * The license and distribution terms for this file may be |
---|
18 | * found in the file LICENSE in this distribution or at |
---|
19 | * http://www.rtems.com/license/LICENSE. |
---|
20 | */ |
---|
21 | |
---|
22 | #if HAVE_CONFIG_H |
---|
23 | #include "config.h" |
---|
24 | #endif |
---|
25 | |
---|
26 | #include <rtems/blkdev.h> |
---|
27 | |
---|
28 | #include <inttypes.h> |
---|
29 | |
---|
30 | void rtems_blkdev_print_stats( |
---|
31 | const rtems_blkdev_stats *stats, |
---|
32 | rtems_printk_plugin_t print, |
---|
33 | void *print_arg |
---|
34 | ) |
---|
35 | { |
---|
36 | (*print)( |
---|
37 | print_arg, |
---|
38 | "-------------------------------------------------------------------------------\n" |
---|
39 | " DEVICE STATISTICS\n" |
---|
40 | "----------------------+--------------------------------------------------------\n" |
---|
41 | " READ HITS | %" PRIu32 "\n" |
---|
42 | " READ MISSES | %" PRIu32 "\n" |
---|
43 | " READ AHEAD TRANSFERS | %" PRIu32 "\n" |
---|
44 | " READ BLOCKS | %" PRIu32 "\n" |
---|
45 | " READ ERRORS | %" PRIu32 "\n" |
---|
46 | " WRITE TRANSFERS | %" PRIu32 "\n" |
---|
47 | " WRITE BLOCKS | %" PRIu32 "\n" |
---|
48 | " WRITE ERRORS | %" PRIu32 "\n" |
---|
49 | "----------------------+--------------------------------------------------------\n", |
---|
50 | stats->read_hits, |
---|
51 | stats->read_misses, |
---|
52 | stats->read_ahead_transfers, |
---|
53 | stats->read_blocks, |
---|
54 | stats->read_errors, |
---|
55 | stats->write_transfers, |
---|
56 | stats->write_blocks, |
---|
57 | stats->write_errors |
---|
58 | ); |
---|
59 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.