-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: test many files * fix * fix * improve reporting * cleanup
- Loading branch information
Showing
6 changed files
with
284 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
./generate_files.sh 1000 10000 bulk_1k_x_10k | ||
./generate_files.sh 5000 10000 bulk_5k_x_10k | ||
./generate_files.sh 1000 1000000 bulk_1k_x_1m | ||
./generate_files.sh 1000 10000 bulk_mix #1kx10k | ||
./generate_files.sh 1000 1000000 bulk_mix #1kx1m | ||
./generate_files.sh 100 10000000 bulk_mix #100x10m | ||
./generate_files.sh 2 1000000000 bulk_mix #2x1g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# Check if the correct number of arguments are provided | ||
if [ "$#" -ne 3 ]; then | ||
echo "Usage: $0 <number_of_files> <file_size_in_bytes> <output_folder>" | ||
exit 1 | ||
fi | ||
|
||
# Assign arguments to variables | ||
NUMBER_OF_FILES=$1 | ||
FILE_SIZE=$2 | ||
OUTPUT_FOLDER=$3 | ||
|
||
# Create the output folder if it doesn't exist | ||
mkdir -p "$OUTPUT_FOLDER" | ||
|
||
# Generate a random 4-character string | ||
RANDOM_STRING=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 4) | ||
|
||
# Generate the files | ||
for (( i=1; i<=$NUMBER_OF_FILES; i++ )) | ||
do | ||
# Generate a file with the specified size | ||
dd if=/dev/urandom of="$OUTPUT_FOLDER/file_${RANDOM_STRING}_$i.bin" bs=$FILE_SIZE count=1 | ||
done | ||
|
||
echo "Generated $NUMBER_OF_FILES files of size $FILE_SIZE bytes in $OUTPUT_FOLDER with prefix file_$RANDOM_STRING" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,237 @@ | ||
{ | ||
"name": "iroh_many_files", | ||
"cases": [ | ||
{ | ||
"name": "1_to_1_1k_10k", | ||
"description": "", | ||
"nodes": [ | ||
{ | ||
"name": "iroh_srv", | ||
"count": 1, | ||
"cmd": "./bins/iroh start --add data/bulk_1k_x_10k", | ||
"type": "public", | ||
"wait": 10, | ||
"connect": { | ||
"strategy": "none" | ||
}, | ||
"param_parser": "iroh_ticket" | ||
}, | ||
{ | ||
"name": "iroh_get", | ||
"count": 1, | ||
"cmd": "time ./bins/iroh blobs get --start %s", | ||
"type": "public", | ||
"connect": { | ||
"strategy": "params", | ||
"node": "iroh_srv" | ||
}, | ||
"process": "short", | ||
"parser": "iroh_cust_10mb" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "1_to_3_1k_10k", | ||
"description": "", | ||
"nodes": [ | ||
{ | ||
"name": "iroh_srv", | ||
"count": 1, | ||
"cmd": "./bins/iroh start --add data/bulk_1k_x_10k", | ||
"type": "public", | ||
"wait": 10, | ||
"connect": { | ||
"strategy": "none" | ||
}, | ||
"param_parser": "iroh_ticket" | ||
}, | ||
{ | ||
"name": "iroh_get", | ||
"count": 3, | ||
"cmd": "time ./bins/iroh blobs get --start %s", | ||
"type": "public", | ||
"connect": { | ||
"strategy": "params", | ||
"node": "iroh_srv" | ||
}, | ||
"process": "short", | ||
"parser": "iroh_cust_10mb" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "1_to_1_5k_10k", | ||
"description": "", | ||
"nodes": [ | ||
{ | ||
"name": "iroh_srv", | ||
"count": 1, | ||
"cmd": "./bins/iroh start --add data/bulk_5k_x_10k", | ||
"type": "public", | ||
"wait": 10, | ||
"connect": { | ||
"strategy": "none" | ||
}, | ||
"param_parser": "iroh_ticket" | ||
}, | ||
{ | ||
"name": "iroh_get", | ||
"count": 1, | ||
"cmd": "time ./bins/iroh blobs get --start %s", | ||
"type": "public", | ||
"connect": { | ||
"strategy": "params", | ||
"node": "iroh_srv" | ||
}, | ||
"process": "short", | ||
"parser": "iroh_cust_50mb" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "1_to_3_5k_10k", | ||
"description": "", | ||
"nodes": [ | ||
{ | ||
"name": "iroh_srv", | ||
"count": 1, | ||
"cmd": "./bins/iroh start --add data/bulk_5k_x_10k", | ||
"type": "public", | ||
"wait": 10, | ||
"connect": { | ||
"strategy": "none" | ||
}, | ||
"param_parser": "iroh_ticket" | ||
}, | ||
{ | ||
"name": "iroh_get", | ||
"count": 3, | ||
"cmd": "time ./bins/iroh blobs get --start %s", | ||
"type": "public", | ||
"connect": { | ||
"strategy": "params", | ||
"node": "iroh_srv" | ||
}, | ||
"process": "short", | ||
"parser": "iroh_cust_50mb" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "1_to_1_1k_1m", | ||
"description": "", | ||
"nodes": [ | ||
{ | ||
"name": "iroh_srv", | ||
"count": 1, | ||
"cmd": "./bins/iroh start --add data/bulk_1k_x_1m", | ||
"type": "public", | ||
"wait": 10, | ||
"connect": { | ||
"strategy": "none" | ||
}, | ||
"param_parser": "iroh_ticket" | ||
}, | ||
{ | ||
"name": "iroh_get", | ||
"count": 1, | ||
"cmd": "time ./bins/iroh blobs get --start %s", | ||
"type": "public", | ||
"connect": { | ||
"strategy": "params", | ||
"node": "iroh_srv" | ||
}, | ||
"process": "short", | ||
"parser": "iroh_1gb" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "1_to_3_1k_1m", | ||
"description": "", | ||
"nodes": [ | ||
{ | ||
"name": "iroh_srv", | ||
"count": 1, | ||
"cmd": "./bins/iroh start --add data/bulk_1k_x_1m", | ||
"type": "public", | ||
"wait": 10, | ||
"connect": { | ||
"strategy": "none" | ||
}, | ||
"param_parser": "iroh_ticket" | ||
}, | ||
{ | ||
"name": "iroh_get", | ||
"count": 3, | ||
"cmd": "time ./bins/iroh blobs get --start %s", | ||
"type": "public", | ||
"connect": { | ||
"strategy": "params", | ||
"node": "iroh_srv" | ||
}, | ||
"process": "short", | ||
"parser": "iroh_1gb" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "1_to_1_mix", | ||
"description": "", | ||
"nodes": [ | ||
{ | ||
"name": "iroh_srv", | ||
"count": 1, | ||
"cmd": "./bins/iroh start --add data/bulk_mix", | ||
"type": "public", | ||
"wait": 10, | ||
"connect": { | ||
"strategy": "none" | ||
}, | ||
"param_parser": "iroh_ticket" | ||
}, | ||
{ | ||
"name": "iroh_get", | ||
"count": 1, | ||
"cmd": "time ./bins/iroh blobs get --start %s", | ||
"type": "public", | ||
"connect": { | ||
"strategy": "params", | ||
"node": "iroh_srv" | ||
}, | ||
"process": "short", | ||
"parser": "iroh_cust_4.01gb" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "1_to_3_mix", | ||
"description": "", | ||
"nodes": [ | ||
{ | ||
"name": "iroh_srv", | ||
"count": 1, | ||
"cmd": "./bins/iroh start --add data/bulk_mix", | ||
"type": "public", | ||
"wait": 10, | ||
"connect": { | ||
"strategy": "none" | ||
}, | ||
"param_parser": "iroh_ticket" | ||
}, | ||
{ | ||
"name": "iroh_get", | ||
"count": 3, | ||
"cmd": "time ./bins/iroh blobs get --start %s", | ||
"type": "public", | ||
"connect": { | ||
"strategy": "params", | ||
"node": "iroh_srv" | ||
}, | ||
"process": "short", | ||
"parser": "iroh_cust_4.01gb" | ||
} | ||
] | ||
} | ||
] | ||
} |