NetBurner 3.5.8
PDF Version
Performance Tests

Example Path: examples/EFFS/Fat/Performance

This example measures the speed of the EFFS FAT file system on an SD/MMC or CompactFlash card: how fast files are created and how fast bulk data can be written and read. It presents an interactive menu on the debug serial port so you can run each test on demand against your own card and hardware.

Note
All EFFS FAT examples require that you add the Embedded Flash File System File Allocation Table (EFFS FAT) library to your project: Add a Library to a Project

Menu Commands

Connect a terminal to the debug serial port and press a single key (no Enter required):

Key Action
B Create a single small file and report the time taken
C Create-files test: create 1000 small files and report total and average creation time
D Delete all files on the drive
L List the files on the drive
F Format the drive (this can take a long time)
W Write-speed test: write 1 MB to a file, both as one write and as ten writes, and report MBps
R Read-speed test: read 1 MB back and report MBps (run W at least once first to create the file)
S Display drive space statistics

The write test creates write.bin (single write) and writem.bin (ten writes); the read test reads write.bin back, so run W before R.

How It Works

Each test brackets the relevant f_* calls with a StopWatch (<stopwatch.h>) and converts the elapsed ticks to seconds. Transfer rates are computed as bytes / seconds / 1,000,000 to give MBps. The buffer used for the read/write tests is a 1 MB static array, so it lives in static storage rather than on the stack.