Home
last modified time | relevance | path

Searched refs:reader (Results 1 – 25 of 111) sorted by relevance

12345

/platform_testing/libraries/flicker/test/src/android/tools/flicker/subject/surfaceflinger/
DLayersTraceSubjectTest.kt57 val reader = getLayerTraceReaderFromAsset("layers_trace_launch_split_screen.perfetto-trace") in <lambda>() constant
58 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in <lambda>()
59 val error = assertThrows<AssertionError> { LayersTraceSubject(trace, reader).isEmpty() } in <lambda>()
65 val reader = getLayerTraceReaderFromAsset("layers_trace_emptyregion.perfetto-trace") in <lambda>() constant
66 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in <lambda>()
68 LayersTraceSubject(trace, reader) in <lambda>()
78 val reader = getLayerTraceReaderFromAsset("layers_trace_launch_split_screen.perfetto-trace") in <lambda>() constant
79 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in <lambda>()
80 LayersTraceSubject(trace, reader) in <lambda>()
89 val reader = getLayerTraceReaderFromAsset("layers_trace_launch_split_screen.perfetto-trace") in <lambda>() constant
[all …]
DLayerTraceEntrySubjectTest.kt54 val reader = getLayerTraceReaderFromAsset("layers_trace_emptyregion.perfetto-trace") in exceptionContainsDebugInfo() constant
55 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in exceptionContainsDebugInfo()
58 LayersTraceSubject(trace, reader).first().visibleRegion(TestComponents.IMAGINARY) in exceptionContainsDebugInfo()
66 val reader = getLayerTraceReaderFromAsset("layers_trace_launch_split_screen.perfetto-trace") in testCanInspectBeginning() constant
67 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in testCanInspectBeginning()
68 LayerTraceEntrySubject(trace.entries.first(), reader) in testCanInspectBeginning()
76 val reader = getLayerTraceReaderFromAsset("layers_trace_launch_split_screen.perfetto-trace") in testCanInspectEnd() constant
77 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in testCanInspectEnd()
78 LayerTraceEntrySubject(trace.entries.last(), reader) in testCanInspectEnd()
86 val reader = getLayerTraceReaderFromAsset("layers_trace_emptyregion.perfetto-trace") in canDetectUncoveredRegion() constant
[all …]
DLayerSubjectTest.kt42 val reader = getLayerTraceReaderFromAsset("layers_trace_emptyregion.perfetto-trace") in exceptionContainsDebugInfoImaginary() constant
43 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in exceptionContainsDebugInfoImaginary()
44 val foundLayer = LayersTraceSubject(trace, reader).first().layer("ImaginaryLayer", 0) in exceptionContainsDebugInfoImaginary()
50 val reader = getLayerTraceReaderFromAsset("layers_trace_emptyregion.perfetto-trace") in canTestAssertionsOnLayer() constant
51 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in canTestAssertionsOnLayer()
52 LayersTraceSubject(trace, reader) in canTestAssertionsOnLayer()
/platform_testing/libraries/flicker/test/src/android/tools/flicker/subject/wm/
DWindowManagerStateSubjectTest.kt45 private val reader = getWmTraceReaderFromAsset("wm_trace_openchrome.pb", legacyTrace = true) constant in android.tools.flicker.subject.wm.WindowManagerStateSubjectTest
47 get() = reader.readWmTrace() ?: error("Unable to read WM trace")
70 WindowManagerTraceSubject(trace, reader) in exceptionContainsDebugInfo()
80 WindowManagerTraceSubject(trace, reader) in canDetectAboveAppWindowVisibility_isVisible()
90 WindowManagerTraceSubject(trace, reader) in canDetectAboveAppWindowVisibility_isInvisible()
108 WindowManagerTraceSubject(trace, reader) in canDetectWindowCoversAtLeastRegion_exactSize()
118 WindowManagerTraceSubject(trace, reader) in canDetectWindowCoversAtLeastRegion_smallerRegion()
127 WindowManagerTraceSubject(trace, reader) in canDetectWindowCoversAtLeastRegion_largerRegion()
143 WindowManagerTraceSubject(trace, reader) in canDetectWindowCoversExactlyRegion_exactSize()
153 WindowManagerTraceSubject(trace, reader) in canDetectWindowCoversExactlyRegion_smallerRegion()
[all …]
DWindowManagerTraceSubjectTest.kt89 val reader = getWmTraceReaderFromAsset("wm_trace_open_from_overview.pb", legacyTrace = true) in <lambda>() constant
90 val trace = reader.readWmTrace() ?: error("Unable to read WM trace") in <lambda>()
91 val subject = WindowManagerTraceSubject(trace, reader) in <lambda>()
178 val reader = getWmTraceReaderFromAsset("wm_trace_open_app_cold.pb", legacyTrace = true) in <lambda>() constant
179 val trace = reader.readWmTrace() ?: error("Unable to read WM trace") in <lambda>()
180 WindowManagerTraceSubject(trace, reader) in <lambda>()
190 val reader = in <lambda>() constant
192 val trace = reader.readWmTrace() ?: error("Unable to read WM trace") in <lambda>()
193 WindowManagerTraceSubject(trace, reader) in <lambda>()
228 val reader = in <lambda>() constant
[all …]
/platform_testing/libraries/flicker/utils/src/android/tools/traces/io/
DResultReaderWithLru.kt43 private val reader: ResultReader = ResultReader(result, traceConfig) constant
44 ) : Reader by reader {
49 val key = CacheKey(reader.artifact.stableId, descriptor, reader.transitionTimeRange) in readWmTrace()
50 return wmTraceCache.logAndReadTrace(key) { reader.readWmTrace() } in readWmTrace()
57 val key = CacheKey(reader.artifact.stableId, descriptor, reader.transitionTimeRange) in readLayersTrace()
58 return layersTraceCache.logAndReadTrace(key) { reader.readLayersTrace() } in readLayersTrace()
65 val key = CacheKey(reader.artifact.stableId, descriptor, reader.transitionTimeRange) in readEventLogTrace()
66 return eventLogCache.logAndReadTrace(key) { reader.readEventLogTrace() } in readEventLogTrace()
71 val slicedReader = reader.slice(startTimestamp, endTimestamp) in slice()
84 Log.d(FLICKER_IO_TAG, "Cache miss $key, $reader") in logAndReadTrace()
[all …]
/platform_testing/libraries/flicker/utils/test/src/android/tools/io/
DResultReaderTest.kt48 val reader = ResultReader(data, TRACE_CONFIG_REQUIRE_CHANGES) in failFileNotFound() constant
50 reader.readTransitionsTrace() ?: error("Should have failed") in failFileNotFound()
57 val reader = ResultReader(data, TRACE_CONFIG_REQUIRE_CHANGES) in slicedResultKeepsStatusInSync() constant
58 val slicedReader = reader.slice(Timestamps.min(), Timestamps.max()) in slicedResultKeepsStatusInSync()
59 reader.result.updateStatus(RunStatus.ASSERTION_SUCCESS) in slicedResultKeepsStatusInSync()
61 Truth.assertThat(reader.runStatus).isEqualTo(RunStatus.ASSERTION_SUCCESS) in slicedResultKeepsStatusInSync()
62 Truth.assertThat(reader.runStatus).isEqualTo(slicedReader.runStatus) in slicedResultKeepsStatusInSync()
64 Truth.assertThat(reader.artifactPath).contains(RunStatus.ASSERTION_SUCCESS.prefix) in slicedResultKeepsStatusInSync()
65 Truth.assertThat(reader.artifactPath).isEqualTo(slicedReader.artifactPath) in slicedResultKeepsStatusInSync()
DResultWriterTest.kt71 val reader = ResultReader(result, TRACE_CONFIG_REQUIRE_CHANGES) in writesEmptyFile() constant
72 Truth.assertWithMessage("File count").that(reader.countFiles()).isEqualTo(0) in writesEmptyFile()
126 val reader = ResultReader(result, TRACE_CONFIG_REQUIRE_CHANGES) in writeWMTrace() constant
127 Truth.assertWithMessage("File count").that(reader.countFiles()).isEqualTo(1) in writeWMTrace()
129 .that(reader.hasTraceFile(TraceType.WM)) in writeWMTrace()
137 val reader = ResultReader(result, TRACE_CONFIG_REQUIRE_CHANGES) in writeLayersTrace() constant
138 Truth.assertWithMessage("File count").that(reader.countFiles()).isEqualTo(1) in writeLayersTrace()
140 .that(reader.hasTraceFile(TraceType.SF)) in writeLayersTrace()
150 val reader = ResultReader(result, TRACE_CONFIG_REQUIRE_CHANGES) in writeTransactionTrace() constant
151 Truth.assertWithMessage("File count").that(reader.countFiles()).isEqualTo(1) in writeTransactionTrace()
[all …]
DBaseResultReaderTestParseTrace.kt50 protected abstract fun doParse(reader: ResultReader): Trace<*>? in <lambda>()
68 val reader = ResultReader(result, TRACE_CONFIG_REQUIRE_CHANGES) in <lambda>() constant
69 val trace = doParse(reader) ?: error("$traceName not built") in <lambda>()
84 val reader = ResultReader(result, TRACE_CONFIG_REQUIRE_CHANGES) in <lambda>() constant
85 val trace = doParse(reader) in <lambda>()
97 val reader = ResultReader(result, TestTraces.TEST_TRACE_CONFIG) in <lambda>() constant
98 val trace = doParse(reader) ?: error("$traceName not built") in <lambda>()
110 val reader = ResultReader(result, TRACE_CONFIG_REQUIRE_CHANGES) in <lambda>() constant
113 doParse(reader) ?: error("$traceName not built") in <lambda>()
/platform_testing/libraries/flicker/src/android/tools/flicker/extractors/
DTaggedScenarioExtractor.kt40 override fun extract(reader: Reader): List<TraceSlice> { in <lambda>()
41 val cujTrace = reader.readCujTrace() ?: error("Missing CUJ trace") in <lambda>()
48 .map { adjustCuj.adjustCuj(it, reader) } in <lambda>()
56 val associatedTransitions = transitionMatcher?.getMatches(reader, cujEntry) in <lambda>()
78 estimateScenarioStartTimestamp(cujEntry, associatedTransition, reader) in <lambda>()
79 val endTimestamp = estimateScenarioEndTimestamp(cujEntry, associatedTransition, reader) in <lambda>()
93 reader: Reader in <lambda>()
97 Utils.interpolateStartTimestampFromTransition(associatedTransition, reader) in <lambda>()
125 reader: Reader in <lambda>()
129 Utils.interpolateFinishTimestampFromTransition(associatedTransition, reader) in <lambda>()
[all …]
DTaggedCujTransitionMatcher.kt29 (transitions: List<Transition>, cujEntry: Cuj, reader: Reader) -> List<Transition> in <lambda>()
36 override fun getMatches(reader: Reader, cujEntry: Cuj): Collection<Transition> { in <lambda>()
47 val transitionsTrace = reader.readTransitionsTrace() ?: error("Missing transitions trace") in <lambda>()
72 transform(transitions, cujEntry, reader) in <lambda>()
107 val inCujRangeFilter: TransitionsTransform = { transitions, cujEntry, reader -> in cujEntry() method
118 reader.readTransactionsTrace() ?: error("Missing transactions trace") in cujEntry()
119 val layersTrace = reader.readLayersTrace() ?: error("Missing layers trace") in cujEntry()
136 val permissionDialogFilter: TransitionsTransform = { transitions, _, reader -> in reader() method
137 transitions.filter { !isPermissionDialogOpenTransition(it, reader) } in reader()
140 val mergeTrampolineTransitions: TransitionsTransform = { transitions, _, reader -> in reader() method
[all …]
DShellTransitionScenarioExtractor.kt24 override fun extract(reader: Reader): List<TraceSlice> { in extract()
25 val transitionsTrace = reader.readTransitionsTrace() ?: error("Missing transitions trace") in extract()
31 val startTimestamp = Utils.interpolateStartTimestampFromTransition(it, reader) in extract()
32 val endTimestamp = Utils.interpolateFinishTimestampFromTransition(it, reader) in extract()
DUtils.kt28 fun interpolateStartTimestampFromTransition(transition: Transition, reader: Reader): Timestamp { in interpolateStartTimestampFromTransition()
29 val wmTrace = reader.readWmTrace() ?: error("Missing WM trace") in interpolateStartTimestampFromTransition()
30 val layersTrace = reader.readLayersTrace() ?: error("Missing layers trace") in interpolateStartTimestampFromTransition()
32 reader.readTransactionsTrace() ?: error("Missing transactions trace") in interpolateStartTimestampFromTransition()
56 reader: Reader in interpolateFinishTimestampFromTransition()
58 val layersTrace = reader.readLayersTrace() ?: error("Missing layers trace") in interpolateFinishTimestampFromTransition()
59 val wmTrace = reader.readWmTrace() ?: error("Missing WM trace") in interpolateFinishTimestampFromTransition()
61 reader.readTransactionsTrace() ?: error("Missing transactions trace") in interpolateFinishTimestampFromTransition()
128 fun getFullTimestampAt(layersTraceEntry: LayerTraceEntry, reader: Reader): Timestamp { in getFullTimestampAt()
129 val wmTrace = reader.readWmTrace() ?: error("Missing WM trace") in getFullTimestampAt()
/platform_testing/libraries/metrics-helper/src/android/support/test/metricshelper/
DMetricsAsserts.java38 public static void assertHasActionLog(String message, MetricsReader reader, int view) { in assertHasActionLog() argument
39 reader.read(0); in assertHasActionLog()
40 assertHasActionLog(message, new ReaderQueue(reader), view); in assertHasActionLog()
55 public static void assertHasVisibilityLog(String message, MetricsReader reader, in assertHasVisibilityLog() argument
57 reader.read(0); in assertHasVisibilityLog()
58 assertHasVisibilityLog(message, new ReaderQueue(reader), view, visible); in assertHasVisibilityLog()
75 public static Queue<LogMaker> findMatchingLogs(MetricsReader reader, LogMaker template) { in findMatchingLogs() argument
76 reader.read(0); in findMatchingLogs()
77 return findMatchingLogs(new ReaderQueue(reader), template); in findMatchingLogs()
100 public static void assertHasLog(String message, MetricsReader reader, LogMaker expected) { in assertHasLog() argument
[all …]
/platform_testing/libraries/flicker/test/src/android/tools/flicker/
DFlickerServiceTest.kt40 val reader = getTraceReaderFromScenario("AppLaunch") in generatesAssertionsFromExtractedScenarios() constant
54 Mockito.`when`(mockScenarioExtractor.extract(reader)).thenReturn(listOf(traceSlice)) in generatesAssertionsFromExtractedScenarios()
57 service.detectScenarios(reader) in generatesAssertionsFromExtractedScenarios()
59 Mockito.verify(mockScenarioExtractor).extract(reader) in generatesAssertionsFromExtractedScenarios()
64 val reader = getTraceReaderFromScenario("AppLaunch") in executesAssertionsReturnedByAssertionFactories() constant
78 Mockito.`when`(mockScenarioExtractor.extract(reader)).thenReturn(listOf(traceSlice)) in executesAssertionsReturnedByAssertionFactories()
81 service.detectScenarios(reader) in executesAssertionsReturnedByAssertionFactories()
83 Mockito.verify(mockScenarioExtractor).extract(reader) in executesAssertionsReturnedByAssertionFactories()
/platform_testing/libraries/flicker/test/src/android/tools/flicker/extractor/
DShellTransitionScenarioExtractorTest.kt31 val reader = getTraceReaderFromScenario("AppLaunch") in <lambda>() constant
33 (reader.readTransitionsTrace() ?: error("Missing transitions trace")).entries.filter { in <lambda>()
48 val slices = noFilterExtractor.extract(reader) in <lambda>()
58 val reader = getTraceReaderFromScenario("AppLaunch") in <lambda>() constant
60 (reader.readTransitionsTrace() ?: error("Missing transitions trace")).entries in <lambda>()
72 val slices = filterToFrontExtractor.extract(reader) in <lambda>()
96 val reader = getTraceReaderFromScenario("AppLaunch") in <lambda>() constant
108 Truth.assertThat(filterToBackExtractor.extract(reader)).hasSize(0) in <lambda>()
/platform_testing/libraries/flicker/utils/test/src/android/tools/traces/surfaceflinger/
DLayersTraceEntryTest.kt40 val reader = getLayerTraceReaderFromAsset("layers_trace_emptyregion.perfetto-trace") in canParseAllLayers() constant
41 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in canParseAllLayers()
50 val reader = getLayerTraceReaderFromAsset("layers_trace_launch_split_screen.perfetto-trace") in canParseVisibleLayersLauncher() constant
51 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in canParseVisibleLayersLauncher()
68 val reader = getLayerTraceReaderFromAsset("layers_trace_launch_split_screen.perfetto-trace") in canParseVisibleLayersSplitScreen() constant
69 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in canParseVisibleLayersSplitScreen()
87 val reader = getLayerTraceReaderFromAsset("layers_trace_launch_split_screen.perfetto-trace") in canParseVisibleLayersInTransition() constant
88 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in canParseVisibleLayersInTransition()
110 val reader = getLayerTraceReaderFromAsset("layers_trace_emptyregion.perfetto-trace") in canParseLayerHierarchy() constant
111 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in canParseLayerHierarchy()
[all …]
DLayersTraceTest.kt35 val reader = getLayerTraceReaderFromAsset(fileName) in detectRootLayer() constant
36 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in detectRootLayer()
66 val reader = getLayerTraceReaderFromAsset("layers_trace_occluded.perfetto-trace") in canTestLayerOccludedByAppLayerHasVisibleRegion() constant
67 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in canTestLayerOccludedByAppLayerHasVisibleRegion()
94 val reader = getLayerTraceReaderFromAsset("layers_trace_occluded.perfetto-trace") in canTestLayerOccludedByAppLayerIsOccludedBySplashScreen() constant
95 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in canTestLayerOccludedByAppLayerIsOccludedBySplashScreen()
115 val reader = in getFirstEntryWithOnDisplay() constant
117 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in getFirstEntryWithOnDisplay()
132 val reader = in getLastEntryWithOnDisplay() constant
134 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in getLastEntryWithOnDisplay()
/platform_testing/libraries/flicker/src/android/tools/flicker/
DFlickerServiceImpl.kt25 override fun detectScenarios(reader: Reader): Collection<ScenarioInstance> { in <lambda>()
28 configEntry.extractor.extract(reader).map { traceSlice -> in <lambda>()
29 ScenarioInstanceImpl.fromSlice(traceSlice, reader, configEntry) in <lambda>()
DScenarioInstanceImpl.kt37 override val reader: Reader, in <lambda>() constant in android.tools.flicker.ScenarioInstanceImpl
66 reader, in <lambda>()
79 reader: Reader, in <lambda>()
82 val layersTrace = reader.readLayersTrace() ?: error("Missing layers trace") in <lambda>()
99 reader = reader.slice(startTimestamp, endTimestamp) in <lambda>()
/platform_testing/libraries/flicker/src/android/tools/flicker/datastore/
DCachedResultReader.kt28 private val reader: Reader = constant
33 ) : Reader by reader { in <lambda>()
34 override fun toString(): String = "$scenario ($reader)" in <lambda>()
/platform_testing/libraries/flicker/test/src/android/tools/flicker/surfaceflinger/
DLayerTraceSubjectTest.kt28 val reader = getLayerTraceReaderFromAsset("layers_trace_emptyregion.perfetto-trace") in exceptionContainsDebugInfo() constant
29 val trace = reader.readLayersTrace() ?: error("Unable to read layers trace") in exceptionContainsDebugInfo()
30 val error = assertThrows<AssertionError> { LayersTraceSubject(trace, reader).isEmpty() } in exceptionContainsDebugInfo()
/platform_testing/libraries/flicker/test/src/android/tools/integration/
DTransitionErrorTest.kt43 val reader = in <lambda>() constant
48 Truth.assertWithMessage("Run status").that(reader.runStatus).isEqualTo(RunStatus.RUN_FAILED) in <lambda>()
72 val reader = in <lambda>() constant
77 Truth.assertWithMessage("Run status").that(reader.runStatus).isEqualTo(RunStatus.RUN_FAILED) in <lambda>()
82 val reader = in <lambda>() constant
87 val file = File(reader.artifactPath) in <lambda>()
DFlickerServiceTracesCollectorTest.kt65 val reader = collector.stop() in canCollectTraces() constant
66 Truth.assertThat(reader.readWmTrace()?.entries).isNotEmpty() in canCollectTraces()
67 Truth.assertThat(reader.readLayersTrace()?.entries).isNotEmpty() in canCollectTraces()
68 Truth.assertThat(reader.readTransitionsTrace()?.entries).isNotEmpty() in canCollectTraces()
78 val reader = collector.stop() in reportsTraceFile() constant
79 val tracePath = reader.artifactPath in reportsTraceFile()
99 val reader = collector.stop() in reportedTraceFileContainsAllTraces() constant
100 val tracePath = reader.artifactPath in reportedTraceFileContainsAllTraces()
111 val reader = collector.stop() in supportHavingNoTransitions() constant
112 val transitionTrace = reader.readTransitionsTrace() ?: error("Expected a transition trace") in supportHavingNoTransitions()
/platform_testing/libraries/flicker/test/src/android/tools/flicker/config/
DFlickerConfigTest.kt68 val reader = getTraceReaderFromScenario("AppLaunch") in canRegisterScenarioWithAssertions() constant
69 val scenarioSlices = entries.first().extractor.extract(reader) in canRegisterScenarioWithAssertions()
72 ScenarioInstanceImpl.fromSlice(scenarioSlices.first(), reader, entries.first()) in canRegisterScenarioWithAssertions()
120 val reader = getTraceReaderFromScenario("AppLaunch") in canUnregisterAssertion() constant
121 val scenarioSlices = entries.first().extractor.extract(reader) in canUnregisterAssertion()
124 ScenarioInstanceImpl.fromSlice(scenarioSlices.first(), reader, entries.first()) in canUnregisterAssertion()
156 val reader = getTraceReaderFromScenario("AppLaunch") in canOverrideStabilityGroup() constant
157 val scenarioSlices = entries.first().extractor.extract(reader) in canOverrideStabilityGroup()
160 ScenarioInstanceImpl.fromSlice(scenarioSlices.first(), reader, entries.first()) in canOverrideStabilityGroup()
203 val reader = getTraceReaderFromScenario("AppLaunch") in registerAssertionToScenario() constant
[all …]

12345