From 251b025b89bab55fc8db992436494ce6914241ab Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 7 Jun 2017 15:21:15 -0700 Subject: Yapf code --- tools/profiling/microbenchmarks/bm_diff/bm_build.py | 1 - tools/profiling/microbenchmarks/bm_diff/bm_constants.py | 1 - tools/profiling/microbenchmarks/bm_diff/bm_diff.py | 7 ++++--- tools/profiling/microbenchmarks/bm_diff/bm_run.py | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) (limited to 'tools/profiling/microbenchmarks/bm_diff') 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 -- cgit v1.2.3