1// Copyright (C) 2019 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15export const PROCESS_SCHEDULING_TRACK_KIND = 'ProcessSchedulingTrack'; 16 17 18export interface SummaryData { 19 kind: 'summary'; 20 21 start: number; 22 end: number; 23 resolution: number; 24 25 bucketSizeSeconds: number; 26 utilizations: Float64Array; 27} 28 29export interface SliceData { 30 kind: 'slice'; 31 32 start: number; 33 end: number; 34 resolution: number; 35 numCpus: number; 36 37 // Slices are stored in a columnar fashion. All fields have the same length. 38 starts: Float64Array; 39 ends: Float64Array; 40 utids: Uint32Array; 41 cpus: Uint32Array; 42} 43 44export type Data = SummaryData | SliceData; 45 46export interface Config { 47 pidForColor: number; 48 upid: null|number; 49 utid: number; 50} 51