aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-06-07 15:21:15 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2017-06-07 15:21:15 -0700
commit251b025b89bab55fc8db992436494ce6914241ab (patch)
tree3dd533d1ff11d60b0ff94ef3e62bb9f2bbe4b288 /tools
parent0ac47d28cdc597804e50ac83ae89308aab250f2f (diff)
Yapf code
Diffstat (limited to 'tools')
-rwxr-xr-xtools/profiling/microbenchmarks/bm_diff/bm_build.py1
-rw-r--r--tools/profiling/microbenchmarks/bm_diff/bm_constants.py1
-rwxr-xr-xtools/profiling/microbenchmarks/bm_diff/bm_diff.py7
-rwxr-xr-xtools/profiling/microbenchmarks/bm_diff/bm_run.py1
4 files changed, 4 insertions, 6 deletions
diff --git a/tools/profiling/microbenchmarks/bm_diff/bm_build.py b/tools/profiling/microbenchmarks/bm_diff/bm_build.py
index bc0310fbdd..4edfe463bd 100755
--- a/tools/profiling/microbenchmarks/bm_diff/bm_build.py
+++ b/tools/profiling/microbenchmarks/bm_diff/bm_build.py
@@ -27,7 +27,6 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
""" Python utility to build opt and counters benchmarks """
import bm_constants
diff --git a/tools/profiling/microbenchmarks/bm_diff/bm_constants.py b/tools/profiling/microbenchmarks/bm_diff/bm_constants.py
index 7d2781ea15..616dd6cdf7 100644
--- a/tools/profiling/microbenchmarks/bm_diff/bm_constants.py
+++ b/tools/profiling/microbenchmarks/bm_diff/bm_constants.py
@@ -27,7 +27,6 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
""" Configurable constants for the bm_*.py family """
_AVAILABLE_BENCHMARK_TESTS = [
diff --git a/tools/profiling/microbenchmarks/bm_diff/bm_diff.py b/tools/profiling/microbenchmarks/bm_diff/bm_diff.py
index 8279125697..47cd35c218 100755
--- a/tools/profiling/microbenchmarks/bm_diff/bm_diff.py
+++ b/tools/profiling/microbenchmarks/bm_diff/bm_diff.py
@@ -48,7 +48,7 @@ verbose = False
def _median(ary):
- assert(len(ary))
+ assert (len(ary))
ary = sorted(ary)
n = len(ary)
if n % 2 == 0:
@@ -141,7 +141,7 @@ def _read_json(filename, badjson_files, nonexistant_files):
nonexistant_files[stripped] += 1
else:
nonexistant_files[stripped] = 1
- return None
+ return None
except ValueError, e:
if stripped in badjson_files:
badjson_files[stripped] += 1
@@ -199,7 +199,8 @@ def diff(bms, loops, track, old, new):
for name in sorted(benchmarks.keys()):
if benchmarks[name].skip(): continue
rows.append([name] + benchmarks[name].row(fields))
- note = 'Corrupt JSON data (indicates timeout or crash) = %s' % str(badjson_files)
+ note = 'Corrupt JSON data (indicates timeout or crash) = %s' % str(
+ badjson_files)
note += '\n\nMissing files (new benchmark) = %s' % str(nonexistant_files)
if rows:
return tabulate.tabulate(rows, headers=headers, floatfmt='+.2f'), note
diff --git a/tools/profiling/microbenchmarks/bm_diff/bm_run.py b/tools/profiling/microbenchmarks/bm_diff/bm_run.py
index 1b3d664d27..0c2e7e36f6 100755
--- a/tools/profiling/microbenchmarks/bm_diff/bm_run.py
+++ b/tools/profiling/microbenchmarks/bm_diff/bm_run.py
@@ -27,7 +27,6 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
""" Python utility to run opt and counters benchmarks and save json output """
import bm_constants