storj/scripts/test-aws-benchmark.sh
Jess G fb86238acc
aws s3 performance tests (#2060)
* add aws s3 benchmark script

* add s3 benchmark tests

* rearrange so smaller diff, fix spelling

* add configurable uplink config for s3-benchmark

* make new bucket w/unique name for each s3 test

* changes per CR
2019-05-28 11:46:58 -07:00

25 lines
1006 B
Bash
Executable File

#!/bin/bash
set -ueo pipefail
# Purpose: This script executes upload and download benchmark tests against aws s3 to compare with storj performance.
# Setup: Assumes the awscli is installed. Assumes $AWS_ACCESS_KEY_ID and $AWS_SECRET_ACCESS_KEY environment
# variables are set with valid aws credentials with permissions to read/write to aws s3.
# Usage: from root of storj repo, run
# $ ./scripts/test-aws-benchmark.sh
aws configure set aws_access_key_id "$AWS_ACCESS_KEY_ID"
aws configure set aws_secret_access_key "$AWS_SECRET_ACCESS_KEY"
aws configure set default.region us-east-1
# run aws s3 benchmark tests
echo
echo "Executing upload/download benchmark tests for aws s3..."
go test -bench=S3 -benchmem ./cmd/uplink/cmd/
# run s3-benchmark with aws s3
echo
echo "Executing s3-benchmark tests with aws s3 client..."
s3-benchmark --client=aws-cli --accesskey="$AWS_ACCESS_KEY_ID" --secretkey="$AWS_SECRET_ACCESS_KEY" --location="us-east-1" --s3-gateway="https://s3.amazonaws.com/"