1// Copyright (C) 2018 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 CPU_SLICE_TRACK_KIND = 'CpuSliceTrack'; 16 17export interface SummaryData { 18 kind: 'summary'; 19 20 start: number; 21 end: number; 22 resolution: number; 23 24 bucketSizeSeconds: number; 25 utilizations: Float64Array; 26} 27 28export interface SliceData { 29 kind: 'slice'; 30 31 start: number; 32 end: number; 33 resolution: number; 34 35 // Slices are stored in a columnar fashion. All fields have the same length. 36 ids: Float64Array; 37 starts: Float64Array; 38 ends: Float64Array; 39 utids: Uint32Array; 40} 41 42export type Data = SummaryData | SliceData; 43 44 45export interface Config { cpu: number; } 46