1 // Copyright 2023 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.base.jank_tracker; 6 7 /** 8 * This class is a container for jank metrics, which are processed FrameMetrics ready to be uploaded 9 * to UMA. 10 */ 11 class JankMetrics { 12 public final long[] timestampsNs; 13 public final long[] durationsNs; 14 public final int[] missedVsyncs; 15 public final boolean[] isJanky; 16 JankMetrics()17 public JankMetrics() { 18 timestampsNs = new long[0]; 19 durationsNs = new long[0]; 20 missedVsyncs = new int[0]; 21 isJanky = new boolean[0]; 22 } 23 JankMetrics(long[] timestampsNs, long[] durationsNs, int[] missedVsyncs)24 public JankMetrics(long[] timestampsNs, long[] durationsNs, int[] missedVsyncs) { 25 this.timestampsNs = timestampsNs; 26 this.durationsNs = durationsNs; 27 this.missedVsyncs = missedVsyncs; 28 isJanky = new boolean[0]; 29 } 30 } 31