Github comments

pull/11367/head
ncteisen 8 years ago
parent 7cd7b7fc43
commit 0ac47d28cd
  1. 2
      tools/profiling/microbenchmarks/bm_diff/bm_build.py
  2. 2
      tools/profiling/microbenchmarks/bm_diff/bm_constants.py
  3. 7
      tools/profiling/microbenchmarks/bm_diff/bm_diff.py
  4. 4
      tools/profiling/microbenchmarks/bm_diff/bm_main.py
  5. 4
      tools/profiling/microbenchmarks/bm_diff/bm_run.py

@ -28,7 +28,7 @@
# (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 """
""" Python utility to build opt and counters benchmarks """
import bm_constants

@ -28,7 +28,7 @@
# (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 """
""" Configurable constants for the bm_*.py family """
_AVAILABLE_BENCHMARK_TESTS = [
'bm_fullstack_unary_ping_pong', 'bm_fullstack_streaming_ping_pong',

@ -48,6 +48,7 @@ verbose = False
def _median(ary):
assert(len(ary))
ary = sorted(ary)
n = len(ary)
if n % 2 == 0:
@ -83,7 +84,7 @@ def _args():
argp.add_argument('-n', '--new', type=str, help='New benchmark name')
argp.add_argument('-o', '--old', type=str, help='Old benchmark name')
argp.add_argument(
'-v', '--verbose', type=bool, help='print details of before/after')
'-v', '--verbose', type=bool, help='Print details of before/after')
args = argp.parse_args()
global verbose
if args.verbose: verbose = True
@ -210,6 +211,4 @@ if __name__ == '__main__':
args = _args()
diff, note = diff(args.benchmarks, args.loops, args.track, args.old,
args.new)
print note
print ""
print diff if diff else "No performance differences"
print('%s\n%s' % (note, diff if diff else "No performance differences"))

@ -139,9 +139,7 @@ def main(args):
text = 'Performance differences noted:\n' + diff
else:
text = 'No significant performance differences'
print note
print ""
print text
print('%s\n%s' % (note, text))
comment_on_pr.comment_on_pr('```\n%s\n\n%s\n```' % (note, text))

@ -28,7 +28,7 @@
# (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 """
""" Python utility to run opt and counters benchmarks and save json output """
import bm_constants
@ -84,7 +84,7 @@ def _args():
args = argp.parse_args()
assert args.name
if args.loops < 3:
print "WARNING: This run will likely be noisy. Increase loops."
print "WARNING: This run will likely be noisy. Increase loops to at least 3."
return args

Loading…
Cancel
Save