mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
Bug 1474208: Use median of all process values for AWSY base content. r=erahm
MozReview-Commit-ID: DBiJjeTlyZE --HG-- extra : rebase_source : deb1d6265e3d2d77a85e3c5f1b32f274c866a623
This commit is contained in:
parent
b271e31bd6
commit
0820be3463
@ -32,6 +32,14 @@ PERF_SUITES = [
|
||||
{ 'name': "Images", 'node': "explicit/images/" }
|
||||
]
|
||||
|
||||
def median(values):
|
||||
sorted_ = sorted(values)
|
||||
med = int(len(sorted_) / 2)
|
||||
|
||||
if len(sorted_) % 2:
|
||||
return sorted_[med]
|
||||
return (sorted_[med - 1] + sorted_[med]) / 2
|
||||
|
||||
def update_checkpoint_paths(checkpoint_files, checkpoints):
|
||||
"""
|
||||
Updates checkpoints with memory report file fetched in data_path
|
||||
@ -85,15 +93,15 @@ def create_suite(name, node, data_path, checkpoints=CHECKPOINTS):
|
||||
memory_report_path = os.path.join(data_path, checkpoint['path'])
|
||||
|
||||
name_filter = checkpoint.get('name_filter', None)
|
||||
count = checkpoint.get('count', 0)
|
||||
if checkpoint.get('median'):
|
||||
process = median
|
||||
else:
|
||||
process = sum
|
||||
|
||||
if node != "resident":
|
||||
totals = parse_about_memory.calculate_memory_report_values(
|
||||
memory_report_path, node, name_filter)
|
||||
if count:
|
||||
value = sum(totals.values()[:count])
|
||||
else:
|
||||
value = sum(totals.values())
|
||||
value = process(totals.values())
|
||||
else:
|
||||
# For "resident" we really want RSS of the chrome ("Main") process
|
||||
# and USS of the child processes. We'll still call it resident
|
||||
|
@ -17,7 +17,7 @@ CHECKPOINTS = [
|
||||
'name': "After tabs open [+30s, forced GC]",
|
||||
'path': "memory-report-TabsOpenForceGC-4.json.gz",
|
||||
'name_filter': 'Web Content', # We only want the content process
|
||||
'count': 1 # We only care about the first one
|
||||
'median': True, # We want the median from all content processes
|
||||
},
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user