From c1c6e3edf7eb91af1583598f6a544e36fc23b91a Mon Sep 17 00:00:00 2001 From: Tamer Tas Date: Tue, 9 Jul 2019 11:43:12 +0000 Subject: [PATCH] Revert "[browser-stories] gate features behind {experimental} flag" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 1db33e5fffe792b9c63dd1a9db15a27781d74acc. Reason for revert: {AttributeError} 'Namespace' object has no attribute 'experimental' Original change's description: > [browser-stories] gate features behind {experimental} flag > > Performance infra recipes use callstats.py to run web page replays. Split (v8, > infa, perf-infra) repositories make experimenting with callstats.py hard. > > This CL creates feature gating for simplifying performance infra experiments. > > R=​ulan@chromium.org > > No-Try: true > Bug: v8:9448 > Change-Id: I2c3e139f4b9d6bce1ea4fdda1a44960d74d7d414 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690950 > Auto-Submit: Tamer Tas > Reviewed-by: Ulan Degenbaev > Commit-Queue: Tamer Tas > Cr-Commit-Position: refs/heads/master@{#62565} TBR=ulan@chromium.org,tmrts@chromium.org Change-Id: If40be01a2edebf0538ad306fa5ded0dfa2aaf147 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:9448 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1692922 Reviewed-by: Tamer Tas Commit-Queue: Tamer Tas Cr-Commit-Position: refs/heads/master@{#62595} --- tools/callstats.py | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/tools/callstats.py b/tools/callstats.py index f95e4d30de..70db89b5da 100755 --- a/tools/callstats.py +++ b/tools/callstats.py @@ -355,37 +355,6 @@ def statistics(data): return { 'samples': N, 'average': average, 'median': median, 'stddev': stddev, 'min': low, 'max': high, 'ci': ci } -def experimental_statistics(data): - # TODO(tmrts): copied from statistics for experimenting, will be removed - # afterwards - N = len(data) - average = numpy.average(data) - median = numpy.median(data) - low = numpy.min(data) - high= numpy.max(data) - if N > 1: - # evaluate sample variance by setting delta degrees of freedom (ddof) to - # 1. The degree used in calculations is N - ddof - stddev = numpy.std(data, ddof=1) - # Get the endpoints of the range that contains 95% of the distribution - t_bounds = scipy.stats.t.interval(0.95, N-1) - #assert abs(t_bounds[0] + t_bounds[1]) < 1e-6 - # sum mean to the confidence interval - ci = { - 'abs': t_bounds[1] * stddev / sqrt(N), - 'low': average + t_bounds[0] * stddev / sqrt(N), - 'high': average + t_bounds[1] * stddev / sqrt(N) - } - else: - stddev = 0 - ci = { 'abs': 0, 'low': average, 'high': average } - if abs(stddev) > 0.0001 and abs(average) > 0.0001: - ci['perc'] = t_bounds[1] * stddev / sqrt(N) / average * 100 - else: - ci['perc'] = 0 - return { 'samples': N, 'average': average, 'median': median, - 'stddev': stddev, 'min': low, 'max': high, 'ci': ci } - def add_category_total(entries, groups, category_prefix): group_data = { 'time': 0, 'count': 0 } @@ -692,9 +661,6 @@ def main(): subparser.add_argument( "--sites", type=str, metavar="", nargs="*", help="specify benchmark website") - subparser.add_argument( - "--experimental", action="store_true", default=False, - help="enable the experimental mode") add_replay_args(subparsers["run"]) # Command: replay-server @@ -753,8 +719,6 @@ def main(): # Execute the command. args = parser.parse_args() setattr(args, 'script_path', os.path.dirname(sys.argv[0])) - if args.experimental: - statistics = experimental_statistics if args.command == "run" and coexist(args.sites_file, args.sites): args.error("use either option --sites-file or site URLs") sys.exit(1)