forked from aws/aws-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbenchmark-rm
More file actions
executable file
·22 lines (17 loc) · 801 Bytes
/
benchmark-rm
File metadata and controls
executable file
·22 lines (17 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python
from benchmark_utils import benchmark_command, get_transfer_command
from benchmark_utils import backup, copy, clean, get_default_argparser
def benchmark_rm(args):
command = get_transfer_command(
'rm %s' % args.target, args.recursive, args.quiet)
backup_path = backup(args.target, args.recursive)
benchmark_command(
command, args.benchmark_script, args.summarize_script,
args.result_dir, args.num_iterations, args.dry_run,
upkeep=lambda: copy(backup_path, args.target, args.recursive),
cleanup=lambda: clean(backup_path, args.recursive)
)
if __name__ == "__main__":
parser = get_default_argparser()
parser.add_argument('-t', '--target', required=True, help='An S3 path.')
benchmark_rm(parser.parse_args())