1# Copyright 2014 The Chromium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5from telemetry.web_perf.metrics import single_event 6 7EVENT_NAME = 'FrameView::performLayout' 8METRIC_NAME = 'layout' 9 10class LayoutMetric(single_event._SingleEventMetric): 11 """Reports directly durations of FrameView::performLayout events. 12 13 layout: Durations of FrameView::performLayout events that were caused by and 14 start during user interaction. 15 16 Layout happens no more than once per frame, so per-frame-ness is implied. 17 """ 18 19 def __init__(self): 20 super(LayoutMetric, self).__init__(EVENT_NAME, METRIC_NAME, 21 metric_description=('List of durations of layouts that were caused by ' 22 'and start during interactions')) 23