Revert "[browser-stories] gate features behind {experimental} flag"

This reverts commit 1db33e5fff.

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 <tmrts@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Tamer Tas <tmrts@chromium.org>
> 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 <tmrts@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62595}
This commit is contained in:
Tamer Tas 2019-07-09 11:43:12 +00:00 committed by Commit Bot
parent c762f127bf
commit c1c6e3edf7

View File

@ -355,37 +355,6 @@ def statistics(data):
return { 'samples': N, 'average': average, 'median': median, return { 'samples': N, 'average': average, 'median': median,
'stddev': stddev, 'min': low, 'max': high, 'ci': ci } '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): def add_category_total(entries, groups, category_prefix):
group_data = { 'time': 0, 'count': 0 } group_data = { 'time': 0, 'count': 0 }
@ -692,9 +661,6 @@ def main():
subparser.add_argument( subparser.add_argument(
"--sites", type=str, metavar="<URL>", nargs="*", "--sites", type=str, metavar="<URL>", nargs="*",
help="specify benchmark website") help="specify benchmark website")
subparser.add_argument(
"--experimental", action="store_true", default=False,
help="enable the experimental mode")
add_replay_args(subparsers["run"]) add_replay_args(subparsers["run"])
# Command: replay-server # Command: replay-server
@ -753,8 +719,6 @@ def main():
# Execute the command. # Execute the command.
args = parser.parse_args() args = parser.parse_args()
setattr(args, 'script_path', os.path.dirname(sys.argv[0])) 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): if args.command == "run" and coexist(args.sites_file, args.sites):
args.error("use either option --sites-file or site URLs") args.error("use either option --sites-file or site URLs")
sys.exit(1) sys.exit(1)