Skip to content

Commit 9bd0939

Browse files
author
Amanda Butler
authored
Merge pull request #320 from kegilbert/profilingbd-api-doc
Add ProfilingBlockDevice API doc
2 parents 9564ee7 + 2e240b9 commit 9bd0939

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
11
## ProfilingBlockDevice
22

3+
The ProfilingBlockDevice class provides a decorator for an existing block device object to log reads, writes and erases.
4+
5+
ProfilingBlockDevices take in a pointer to the block device being profiled as the only configurable parameter. If you want to count a storage operation such as programming, reading or writing to a block device, you should use the ProfilingBlockDevice object as the interface to the storage block rather than the underlying device. The below example highlights this use case.
6+
7+
### ProfilingBlockDevice class reference
8+
9+
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/v5.6/mbed-os-api-doxy/class_profiling_block_device.html)
10+
11+
### ProfilingBlockDevice example
12+
13+
Create a ProfilingBlockDevice, perform storage operations and report back the read, write and erase counts.
14+
15+
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/ProfilingBlockDevice_ex_1/)](https://os.mbed.com/compiler/#nav:/ProfilingBlockDevice_ex_1/main.cpp;)

0 commit comments

Comments
 (0)