| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository is no longer actively maintained on GitHub. The current version is a Bash script maintained in Codeberg, a free community alternative to GitHub. testFilesCreate - Bash script, Codeberg
A small Linux app that creates test files filling them with random data in a single directory or a directory tree.
See Comaparitive benchmark testing of data compression and deduplication section on how testFileCreate can be used as a standardised benchmark for comparing data storage reduction techniques.
testFilesCreate is a Linux portable x64 executable created from the bash script using the shc utility, more info: Github shc
This requires a Linux bash environment to run. Will run in Microsoft WSL2(Linux), TestFilesCreate will not run in MSYS2, Gitbash and Cygwin environmants
Examples using testFileCreate to create data
Examples using testFileCreate to calculate storage requirements plus directories and files created
testFilesCreate datasheet - There are known browser issues with gitHub displaying PDF files, download it if gitHub refuses to display it.
testFileCreate -C
User Inputs: Tree depth, width, number files per directory and file size
Output: Summary, tables of data trees of current and smaller trees. Tables contain data size and file numbers for each tree
DEFAULTS
Maximum permitted values, see Limitations section
OPTIONS :
Directory Layout All mandatory
For the following, n is a number, minimum is 1
Create single directory: -d 1 (-w if set, will be ignored)
Create tree of directories:
File Size A file size is mandatory
Fixed File Size
NOTE: Default content for fixed file size of printable data is: ALL FILES ARE IDENTICAL, use
Random File Size
File Contents Default is random binary
-P n Where n is a number in the range 1 to 95. Selects the pool of printable characters from the ASCII set.
-D n Where n is a number in the range 1 to 10. Selects the pool of digit charcters from the ASCII set.
-r Random content for fixed file sizes.
INPUT, OUTPUT and LOGGING
LIMITATIONS
Data creation bails out before any data creation if:
If the 'seq' command is not avaiable. The character pool will not be displayed in the inital summary. The seq command is not required for file creation.
Binary data is generated from /dev/urandom. This data will not compress that well. Binary data that is stored/transmitted may render data deduplication and compression ineffective.
FILE CONTENT VALIDATION
Validate contents: all Files:
od -N <bytes> -Ax -t x1z <file name>
Validate printable character distribution:
od -a <file name> | cut -b 9- | tr " " \\n | egrep -v "^$" | sort | uniq -c OR sed 's/\(.\)/\1\n/g' <file name> | sort | uniq -c
Output
Validate printable character pool count:
Example: confirms that a complexity of 17 given by -P 17 contains a pool of 17 different characters.
od -a <file name> | cut -b 9- | tr " " \\n | egrep -v "^$" | sort | uniq -c | wc -l OR sed 's/\(.\)/\1\n/g' <file name> | sort | uniq -c | wc -l
Duplicate files Duplicate files will occur when file size is very small and the pool of random characters is small.
Examples - Testing for duplicate files. Number of files for each test was 1 million.
./testFileCreate -d 1 -w 1 -n 1000000 -f 35B -P2 -r # creates 1 million files in a single directory each 35 byte file is
# randomly filled with two characters (ab)
Three characters (abc) in random pool
| File size (bytes) | Number of duplicate files |
|---|---|
| 20 | 146 |
| 25 | 0 |
| 30 | 0 |
Two characters (ab) in random pool
| File size (bytes) | Number of duplicate files |
|---|---|
| 25 | 14,6623 (1.5%) |
| 30 | 465 (0.05%) |
| 35 | 20 |
| 40 | 1 |
Examples - Creating data
testFilesCreate -P 28 -d 3 -w 5 -f 15M -n 50
DIRECTORY TREE each directory contains 5 directories and 50 files
The tree is 3 levels deep
Output: /home/ted/test/tfc_240930-1759-37
All files with identical contents
Files created are all 15M
Storage used...... 22.71G (max potential)
File Contents..... Random selection from the 28 char set: !"#$%&'()*+,-./0123456789:;<
Total data directories........30
Total data files............1550
Do you want to proceed? (y/n)
testFilesCreate -D 5 -d 1 -f 600K -n 1000 -r -o /home/ted/test
SINGLE DIRECTORY containing 1000 files
Output: /home/ted/test/tfc_240930-1802-53
Random data created individually for all files
Files created are all 600K
Storage used...... 585.94M (max potential)
File Contents..... Random selection from the 5 digit set: 01234
Total data directories.........1
Total data files............1000
Do you want to proceed? (y/n)
testFileCreate can be used as a standardised benchmark for comparing data storage reduction techniques.
In these examples the Data Complexity is set by the -P option. A data complexity of 10 = -P 10 and a data complexity of 12 = -P 12
For more information on the creation of the charts see testFilesCreate datasheet .
| Back | FazBrowse Home | New Git URL |