You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most test currently are using multiple n-byte generated text files.
In practice users would have a richer diversity of files, hence this commit:
- Add instructions on how to tests with a variety of files types and sizes
- Adds a helper bash script to help duplicate/scale the test variety data to a specified volume
Signed-off-by: Fon E. Noel NFEBE <[email protected]>
Copy file name to clipboardexpand all lines: README.md
+30-4
Original file line number
Diff line number
Diff line change
@@ -111,8 +111,8 @@ Run `./upload-test.py test-tree/challenging-names --only=414 --remote-dir=test-4
111
111
```
112
112
- No duplicates should be be seen on Permanent UI.
113
113
114
+
### Uploads
114
115
#### Large uploads
115
-
##### Uploads
116
116
117
117
To test large file (`400MB` +) uploads, a couple of large files are required. Some ready-made test files can be downloaded via:
118
118
@@ -192,14 +192,14 @@ Run
192
192
Check the downloads folder in `test-tree/downloads` and ensure that the `downloads/nested` directory has a structure like the nested directory uploaded in the [nested uploads test](#nested-uploads).
193
193
194
194
195
-
####Quantity Tests
195
+
### Quantity Tests
196
196
197
197
To test uploads/downloads with a large number of files, we definitely need "a large number" of files on either side (local/remote) of the process.
198
198
199
199
To generate a number of files with a specific size in `test-tree/special-files`, run `./create-files.py --quantity 10 --size 10000 --root-name "10-10B"` (*In this case, the command would generate 10, 10 bytes files.*)
200
200
201
201
*Take note that in the command `--quantity`, `--size` and `--root-name` are arguments whose values you can change. Quanity for number of files, size for file zie and root name for the name of the parent folder that would hold the files*
202
-
#####Large number of uploads
202
+
#### Large number of uploads
203
203
204
204
For 1000, 1B Files:
205
205
- Run `./create-files.py`
@@ -223,8 +223,34 @@ For 1000, 5MB Files:
223
223
224
224
*Of course, by looking at the pattern above, other number-size arrangements can be generated for further testing.*
225
225
226
+
#### Variety of file types/sizes
226
227
227
-
##### Large number of downloads
228
+
*Prepare data variety*
229
+
230
+
To test a variety of file types/sizes simply create a directory in `test-tree` such as `variety` and store a bunch of diffent files types in the range of a few kilo bytes to about 50 mega bytes. Ideally, a few images (`.png`, `.jpg`), document files (`.docx`, `.ppt`, `.xlxs`), video and sound files, and archive files.
231
+
232
+
*Otherwise*
233
+
234
+
- You can download our test data stored in aws via `aws s3 cp s3://permanent-repos/test_files/critical-path.zip ./test-tree/variety`. (Access required via aws authentication)
235
+
- It's a zip file, so remember to unzip: `unzip -d ./test-tree/variety ./test-tree/variety/critical-path.zip`
236
+
- Delete the zip or move it to avoid it being part of the test data `rm ./test-tree/variety/critical-path.zip`
237
+
238
+
*Duplicate data*
239
+
240
+
Once you have the files in place, you duplicate the files to achieve a desire volume using the duplication script described in the next section.
241
+
242
+
The `./duplicate-files` script is designed to create multiple copies of files in a specified source directory. It allows you to make 'n' copies of each file found in the source directory and save them in either the same directory or a different destination directory.
0 commit comments