diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-12-11 21:31:38 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-12-11 21:43:33 +0100 |
| commit | c9d168d6d45d57304c7dcbe4c5cbaf949385764c (patch) | |
| tree | 6a73e1c5dddb2c9a74f8c1582a535fa8ca046b81 /src/benchmarks/redis.py | |
| parent | 372a5366458c88a3571b4b7a19db538bbf947c3d (diff) | |
| download | allocbench-c9d168d6d45d57304c7dcbe4c5cbaf949385764c.tar.gz allocbench-c9d168d6d45d57304c7dcbe4c5cbaf949385764c.zip | |
fmt benchmark definitions with yapf
Diffstat (limited to 'src/benchmarks/redis.py')
| -rw-r--r-- | src/benchmarks/redis.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/benchmarks/redis.py b/src/benchmarks/redis.py index 4768c78..827b14c 100644 --- a/src/benchmarks/redis.py +++ b/src/benchmarks/redis.py @@ -14,7 +14,6 @@ # # You should have received a copy of the GNU General Public License # along with allocbench. If not, see <http://www.gnu.org/licenses/>. - """Definition of the redis benchmark @@ -32,20 +31,20 @@ from src.artifact import ArchiveArtifact from src.benchmark import Benchmark from src.util import print_info - REQUESTS_RE = re.compile("(?P<requests>(\\d*.\\d*)) requests per second") class BenchmarkRedis(Benchmark): """Definition of the redis benchmark""" - def __init__(self): name = "redis" self.cmd = "redis-benchmark 1000000 -n 1000000 -P 8 -q lpush a 1 2 3 4 5 6 7 8 9 10 lrange a 1 10" - self.servers = [{"name": "redis", - "cmd": "redis-server", - "shutdown_cmds": ["{build_dir}/redis-cli shutdown"]}] + self.servers = [{ + "name": "redis", + "cmd": "redis-server", + "shutdown_cmds": ["{build_dir}/redis-cli shutdown"] + }] super().__init__(name) @@ -54,19 +53,20 @@ class BenchmarkRedis(Benchmark): redis_version = "5.0.5" self.results["facts"]["versions"]["redis"] = redis_version - redis = ArchiveArtifact("redis", - f"http://download.redis.io/releases/redis-{redis_version}.tar.gz", - "tar", - "71e38ae09ac70012b5bc326522b976bcb8e269d6") + redis = ArchiveArtifact( + "redis", + f"http://download.redis.io/releases/redis-{redis_version}.tar.gz", + "tar", "71e38ae09ac70012b5bc326522b976bcb8e269d6") redis_dir = os.path.join(self.build_dir, f"redis-{redis_version}") redis.provide(self.build_dir) # building redis - proc = subprocess.run(["make", "-C", redis_dir, "MALLOC=libc", "USE_JEMALLOC=no"], - # stdout=subprocess.PIPE, stderr=subprocess.PIPE, - universal_newlines=True) + proc = subprocess.run( + ["make", "-C", redis_dir, "MALLOC=libc", "USE_JEMALLOC=no"], + # stdout=subprocess.PIPE, stderr=subprocess.PIPE, + universal_newlines=True) # create symlinks for exe in ["redis-cli", "redis-server", "redis-benchmark"]: |
