From 8174a918ea3b7cb216bf7ea98cfdc10661b5c37d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 6 May 2020 16:56:32 +0200 Subject: make the whole project more python idiomatic * rename src directory to allocbench * make global variable names UPPERCASE * format a lot of code using yapf * use lowercase ld_preload and ld_library_path as Allocator members * name expected Errors 'err' and don't raise a new Exception * disable some pylint messages --- doc/Benchmarks.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/Benchmarks.md') diff --git a/doc/Benchmarks.md b/doc/Benchmarks.md index e883afb..e8add89 100644 --- a/doc/Benchmarks.md +++ b/doc/Benchmarks.md @@ -46,9 +46,9 @@ Delorie using the tools from dj/malloc branch of the glibc. 1. Make sure your command is deterministic and allocator behavior is a significant part of your measured results 2. Create a new Python class for your benchmark. You can inherit from the - provided class src.Benchmark. + provided class allocbench.Benchmark. 3. Implement your custom functionality -4. Export a object of your class in a python file under src/benchmarks named +4. Export a object of your class in a python file under allocbench/benchmarks named like your exported object and allocbench will find it automatically. #### loop.py as Example @@ -73,7 +73,7 @@ Delorie using the tools from dj/malloc branch of the glibc. """Definition of the loop micro benchmark""" -from src.benchmark import Benchmark +from allocbench.benchmark import Benchmark class BenchmarkLoop(Benchmark): @@ -129,7 +129,7 @@ loop = BenchmarkLoop() ## The Benchmark class -The class Benchmark defined in the src/benchmark.py implements most +The class Benchmark defined in the allocbench/benchmark.py implements most common operations for a benchmark. It provides load and save functions using pythons pickle module, helpers generating plots using matplotlib and most importantly a run method using -- cgit v1.2.3