FileArb is a cross-platform C++ command line program for quickly creating in parallel an arbitrary number of arbitrarily large text files or binary files.
Three use cases for FileArb:
- Performance testing the write speed of storage hardware such as USB drives, NVMe drives, and network file shares.
- Performance testing file-I/O-intensive programs such as FileRevisor which perform many file operations such as text replacement.
- Learning the true cost of cloud storage resources by way of creating, for example, 10 1-GB files on an Azure file share followed by examining the resulting Azure bill.
- FileArb command line usage
- FileArb program modes
- FileArb code structure as it appears in Visual Studio Code on Linux
- FileArb code structure as it appears in Visual Studio 2022 on Windows
- Linux Jenkins jobs which build and statically analyze FileArb
- Windows Jenkins jobs which build and statically analyze FileArb
- 4 commands to build binary filearb on Linux with Clang
- 4 commands to build executable FileArb.exe on Windows with Visual Studio 2022
- Thanks to
FileArb v1.1.0 - Creates arbitrarily large text files or binary files.
Optional suffixes for --bytes arguments: b or B, k or K, m or M, and g or G.
Usage:
filearb create-binary-file
--target=<DirectoryPath>
--bytes=<NumberOfBytes>
[--random-bytes]
filearb create-binary-files
--target=<DirectoryPath>
--directories=<NumberOfDirectories>
--files=<NumberOfFiles>
--bytes=<BytesPerFile>
[--random-bytes]
[--parallel]
[--quiet]
filearb create-text-file
--target=<DirectoryPath>
--lines=<LinesPerFile>
--characters=<CharactersPerLine>
[--random-letters]
filearb create-text-files
--target=<DirectoryPath>
--directories=<NumberOfDirectories>
--files=<FilesPerDirectory>
--lines=<LinesPerFile>
--characters=<CharactersPerLine>
[--random-letters]
[--parallel]
[--quiet]
filearb create-binary-file
--target=<TargetDirectoryPath>
--bytes=<NumberOfBytes>
[--random-bytes]
create-binary-file
creates in a specified --target
directory a file named binaryfile.bin
containing --bytes
number of binary 0 bytes.
Console output for filearb create-binary-file --target=. --bytes=2G
on Linux:
Console output for FileArb.exe create-binary-file --target=. --bytes=2G
on Windows:
--random-bytes
can be specified to create a binary file containing pseudorandom bytes sampled from std::random_device
.
Here are the contents of one potential random binary file after running filearb create-binary-file --target=C:\FileArbTesting --bytes=64 --random-bytes
:
filearb create-binary-files
--target=<TargetDirectoryPath>
--directories=<NumberOfDirectories>
--files=<NumberOfFiles>
--bytes=<BytesPerFile>
[--random-bytes]
[--parallel]
[--quiet]
create-binary-files
creates in a specified --target
directory a specified number of --directories
each containing a specified number of --files
each containing --bytes
number of 0 bytes or [--random-bytes]
.
Console output for filearb create-binary-files --target=. --directories=5 --files=3 --bytes=1024 --random-bytes --parallel
on Linux:
filearb create-text-file
--target=<TargetDirectoryPath>
--lines=<LinesPerFile>
--characters=<CharactersPerLine>
[--random-letters]
create-text-file
creates a text file in a specified --target
directory containing --lines
number of lines each containing --characters
number of 0
ASCII characters per line or random capital letters if --random-letters
is specified.
Console output for filearb create-text-file --target=. --lines=5 --characters=10
on Linux:
filearb create-text-files
--target=<DirectoryPath>
--directories=<NumberOfDirectories>
--files=<FilesPerDirectory>
--lines=<LinesPerFile>
--characters=<CharactersPerLine>
[--random-letters]
[--parallel]
[--quiet]
filearb create-text-files
creates at a specified --target
directory a specified number of --directories
each containing a specified number of --files
containing 0
ASCII characters or --random-letters
.
Console output for filearb create-text-files --target=target_dir --directories=5 --files=3 --lines=3 --characters=64 --random-letters --parallel
on Linux:
git clone https://github.com/NeilJustice/FileArb
cd FileArb && mkdir Release && cd Release
CXX=clang++ cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release
sudo cmake --build . --target install
Resulting binary /usr/local/bin/filearb
:
git clone https://github.com/NeilJustice/FileArb
cd FileArb
cmake . -G"Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX=C:\bin
cmake --build . --config Release --target install
Resulting executable C:\bin\FileArb.exe
:
brandmark.io for FileArb's logo