1#!/usr/bin/env python3 2# Copyright (C) 2023 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License a 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16from python.generators.diff_tests.testing import Csv, DataPath 17from python.generators.diff_tests.testing import DiffTestBlueprint 18from python.generators.diff_tests.testing import TestSuite 19 20 21class Gzip(TestSuite): 22 23 def test_gzip_multi_stream(self): 24 return DiffTestBlueprint( 25 trace=DataPath('sfgate-gzip-multi-stream.json.gz'), 26 query='''select ts, dur, name from slice limit 10''', 27 out=Csv(''' 28 "ts","dur","name" 29 2213649212614000,239000,"ThreadTimers::sharedTimerFiredInternal" 30 2213649212678000,142000,"LayoutView::hitTest" 31 2213649214331000,34000,"ThreadTimers::sharedTimerFiredInternal" 32 2213649215569000,16727000,"ThreadTimers::sharedTimerFiredInternal" 33 2213649216760000,50000,"Node::updateDistribution" 34 2213649217290000,1373000,"StyleElement::processStyleSheet" 35 2213649218908000,4862000,"Document::updateRenderTree" 36 2213649218917000,50000,"Node::updateDistribution" 37 2213649218970000,4796000,"Document::updateStyle" 38 2213649218995000,54000,"RuleSet::addRulesFromSheet" 39 ''')) 40