/platform_testing/libraries/flicker/utils/test/src/android/tools/utils/ |
D | MockWindowStateBuilder.kt | 23 var timestamp = -1L variable in android.tools.utils.MockWindowStateBuilder 26 constructor(timestamp: Long) : this() { 27 setTimestamp(timestamp) 31 if (timestamp <= 0L) { 32 timestamp = ++lastTimestamp 36 fun setTimestamp(timestamp: Long): MockWindowStateBuilder = apply { in <lambda>() 37 require(timestamp > 0) { "Timestamp must be a positive value." } in <lambda>() 38 this.timestamp = timestamp in <lambda>() 39 lastTimestamp = timestamp in <lambda>() 44 elapsedTimestamp = timestamp, in build()
|
D | MockLayerTraceEntryBuilder.kt | 30 var timestamp = -1L variable in android.tools.utils.MockLayerTraceEntryBuilder 33 constructor(timestamp: Long) : this() { 34 setTimestamp(timestamp) 38 if (timestamp <= 0L) { 39 timestamp = ++lastTimestamp 64 fun setTimestamp(timestamp: Long): MockLayerTraceEntryBuilder = apply { in <lambda>() 65 require(timestamp > 0) { "Timestamp must be a positive value." } in <lambda>() 66 this.timestamp = timestamp in <lambda>() 67 lastTimestamp = timestamp in <lambda>() 72 elapsedTimestamp = timestamp, in build()
|
D | MockWindowManagerTraceBuilder.kt | 29 entries.sortBy { it.timestamp } in <lambda>() 33 require(entries.zipWithNext { prev, cur -> prev.timestamp < cur.timestamp }.all { it }) { in <lambda>()
|
D | MockLayersTraceBuilder.kt | 29 entries.sortBy { it.timestamp } in <lambda>() 33 require(entries.zipWithNext { prev, cur -> prev.timestamp < cur.timestamp }.all { it }) { in <lambda>()
|
/platform_testing/libraries/flicker/utils/src/android/tools/ |
D | Trace.kt | 29 fun getEntryExactlyAt(timestamp: Timestamp): Entry { in slice() 30 return entries.firstOrNull { it.timestamp == timestamp } in slice() 31 ?: throw RuntimeException("Entry does not exist for timestamp $timestamp") in slice() 44 fun getEntryAt(timestamp: Timestamp): Entry { in getEntryAt() 45 return entries.toList().dropLastWhile { it.timestamp > timestamp }.lastOrNull() in getEntryAt() 46 ?: error("No entry at or before timestamp $timestamp") in getEntryAt()
|
D | Timestamp.kt | 104 operator fun minus(timestamp: Timestamp): Timestamp { in minus() 106 if (this.hasElapsedTimestamp && timestamp.hasElapsedTimestamp) { in minus() 107 this.elapsedNanos - timestamp.elapsedNanos in minus() 112 if (this.hasSystemUptimeTimestamp && timestamp.hasSystemUptimeTimestamp) { in minus() 113 this.systemUptimeNanos - timestamp.systemUptimeNanos in minus() 118 if (this.hasUnixTimestamp && timestamp.hasUnixTimestamp) { in minus() 119 this.unixNanos - timestamp.unixNanos in minus()
|
/platform_testing/libraries/flicker/test/src/android/tools/flicker/subject/region/ |
D | RegionSubjectTest.kt | 34 RegionSubject(rectA, timestamp = Timestamps.empty()).isHigher(rectB) in expectAllFailPositionChange() 37 RegionSubject(rectA, timestamp = Timestamps.empty()).isHigherOrEqual(rectB) in expectAllFailPositionChange() 40 RegionSubject(rectA, timestamp = Timestamps.empty()).isLower(rectB) in expectAllFailPositionChange() 43 RegionSubject(rectA, timestamp = Timestamps.empty()).isLowerOrEqual(rectB) in expectAllFailPositionChange() 51 RegionSubject(rectA, timestamp = Timestamps.empty()).isHigher(rectB) in detectPositionChangeHigher() 52 RegionSubject(rectA, timestamp = Timestamps.empty()).isHigherOrEqual(rectB) in detectPositionChangeHigher() 54 RegionSubject(rectA, timestamp = Timestamps.empty()).isLower(rectB) in detectPositionChangeHigher() 57 RegionSubject(rectA, timestamp = Timestamps.empty()).isLowerOrEqual(rectB) in detectPositionChangeHigher() 65 RegionSubject(rectA, timestamp = Timestamps.empty()).isLower(rectB) in detectPositionChangeLower() 66 RegionSubject(rectA, timestamp = Timestamps.empty()).isLowerOrEqual(rectB) in detectPositionChangeLower() [all …]
|
/platform_testing/libraries/flicker/src/android/tools/flicker/extractors/ |
D | Utils.kt | 35 val elapsedNanos = lastWmEntryBeforeTransitionCreated.timestamp.elapsedNanos in interpolateStartTimestampFromTransition() 36 val unixNanos = lastWmEntryBeforeTransitionCreated.timestamp.unixNanos in interpolateStartTimestampFromTransition() 40 layersTrace.getEntryForTransaction(it).timestamp in interpolateStartTimestampFromTransition() 70 layersTrace.getEntryForTransaction(it).timestamp in interpolateFinishTimestampFromTransition() 82 wmTrace.entries.firstOrNull { it.timestamp >= transition.finishTime } in interpolateFinishTimestampFromTransition() 85 wmEntryAtTransitionFinished?.timestamp?.elapsedNanos in interpolateFinishTimestampFromTransition() 90 wmEntryAtTransitionFinished.timestamp.unixNanos in interpolateFinishTimestampFromTransition() 95 abs(it.timestamp.elapsedNanos - transition.finishTime.elapsedNanos) in interpolateFinishTimestampFromTransition() 99 closestWmEntry.timestamp.unixNanos - closestWmEntry.timestamp.elapsedNanos in interpolateFinishTimestampFromTransition() 104 layersTrace.entries.firstOrNull { it.timestamp.unixNanos >= unixNanos } in interpolateFinishTimestampFromTransition() [all …]
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/parsers/ |
D | TraceParserTest.kt | 34 mockTraceForSliceTests.entries.first().timestamp.elapsedNanos - 1, in canSliceWithAllBefore() 62 Truth.assertThat(splitLayersTraceWithInitialEntry.entries.first().timestamp) in canSliceWithAllAfter() 63 .isEqualTo(mockTraceForSliceTests.entries.last().timestamp) in canSliceWithAllAfter() 74 mockTraceForSliceTests.entries.first().timestamp.elapsedNanos - 1, in canSliceFromBeforeFirstEntryToMiddle() 84 mockTraceForSliceTests.entries.last().timestamp.elapsedNanos + 5, in canSliceFromMiddleToAfterLastEntry() 92 mockTraceForSliceTests.entries.first().timestamp.elapsedNanos - 1, in canSliceFromBeforeToAfterLastEntry() 93 mockTraceForSliceTests.entries.last().timestamp.elapsedNanos + 1, in canSliceFromBeforeToAfterLastEntry() 94 mockTraceForSliceTests.entries.map { it.timestamp } in canSliceFromBeforeToAfterLastEntry() 101 mockTraceForSliceTests.entries.first().timestamp, in canSliceFromExactStartToAfterLastEntry() 102 mockTraceForSliceTests.entries.last().timestamp.elapsedNanos + 1, in canSliceFromExactStartToAfterLastEntry() [all …]
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/surfaceflinger/ |
D | LayersTrace.kt | 44 .dropWhile { it.timestamp < startTimestamp } in <lambda>() 45 .dropLastWhile { it.timestamp > endTimestamp } in <lambda>() 59 fun getFirstEntryWithOnDisplayAfter(timestamp: Timestamp): LayerTraceEntry { in <lambda>() 61 it.timestamp >= timestamp && it.displays.any { display -> display.isOn } in <lambda>() 63 ?: error("No entry after $timestamp in layer trace with on display.") in <lambda>() 66 fun getLastEntryWithOnDisplayBefore(timestamp: Timestamp): LayerTraceEntry { in <lambda>() 68 it.timestamp <= timestamp && it.displays.any { display -> display.isOn } in <lambda>() 70 ?: error("No entry before $timestamp in layer trace with on display.") in <lambda>()
|
D | TransactionsTrace.kt | 29 prev.timestamp.elapsedNanos < next.timestamp.elapsedNanos in <lambda>() 44 .dropWhile { it.timestamp < startTimestamp } in <lambda>() 45 .dropLastWhile { it.timestamp > endTimestamp } in <lambda>()
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/events/ |
D | CujTrace.kt | 37 val sortedCujEvents = cujEvents.sortedBy { it.timestamp.unixNanos } in from() 46 it.cuj == startEvent.cuj && it.timestamp >= startEvent.timestamp in from() 50 it.cuj == startEvent.cuj && it.timestamp >= startEvent.timestamp in from() 60 it?.timestamp ?: Timestamps.max() in from() 67 startEvent.timestamp, in from() 68 closingEvent.timestamp, in from()
|
D | FocusEvent.kt | 35 timestamp: Timestamp, 42 ) : Event(timestamp, processId, uid, threadId, INPUT_FOCUS_TAG) { 50 return "$timestamp: Focus ${type.name} $window Reason=$reason" in toString() 59 timestamp: Timestamp, in from() 66 timestamp, in from()
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/inputmethod/ |
D | ImeClientEntry.kt | 41 override val timestamp = Timestamps.from(systemUptimeNanos = elapsedTimestamp) constant in android.tools.traces.inputmethod.ImeClientEntry 45 get() = timestamp.toString() 49 return other is ImeClientEntry && other.timestamp == this.timestamp in toString() 52 var result = timestamp.hashCode() in hashCode()
|
D | InputMethodServiceEntry.kt | 58 override val timestamp = Timestamps.from(systemUptimeNanos = elapsedTimestamp) constant in android.tools.traces.inputmethod.InputMethodServiceEntry 62 get() = timestamp.toString() 67 return other is InputMethodServiceEntry && other.timestamp == this.timestamp in toString() 71 var result = timestamp.hashCode() in hashCode()
|
D | InputMethodManagerServiceEntry.kt | 56 override val timestamp = Timestamps.from(systemUptimeNanos = elapsedTimestamp) constant in android.tools.traces.inputmethod.InputMethodManagerServiceEntry 60 get() = timestamp.toString() 65 return other is InputMethodManagerServiceEntry && other.timestamp == this.timestamp in toString() 69 var result = timestamp.hashCode() in hashCode()
|
D | ImeClientTrace.kt | 46 .dropWhile { it.timestamp < startTimestamp } in slice() 47 .dropLastWhile { it.timestamp > endTimestamp } in slice()
|
D | InputMethodManagerServiceTrace.kt | 52 .dropWhile { it.timestamp < startTimestamp } in slice() 53 .dropLastWhile { it.timestamp > endTimestamp } in slice()
|
D | InputMethodServiceTrace.kt | 51 .dropWhile { it.timestamp < startTimestamp } in slice() 52 .dropLastWhile { it.timestamp > endTimestamp } in slice()
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/traces/wm/ |
D | WindowManagerTraceEntryBuilderTest.kt | 55 Truth.assertThat(entry.timestamp.elapsedNanos).isEqualTo(100) in createsEntryWithCorrectClockTime() 56 Truth.assertThat(entry.timestamp.systemUptimeNanos) in createsEntryWithCorrectClockTime() 58 Truth.assertThat(entry.timestamp.unixNanos).isEqualTo(600) in createsEntryWithCorrectClockTime() 78 Truth.assertThat(entry.timestamp.elapsedNanos).isEqualTo(100) in supportsMissingRealToElapsedTimeOffsetNs() 79 Truth.assertThat(entry.timestamp.systemUptimeNanos) in supportsMissingRealToElapsedTimeOffsetNs() 81 Truth.assertThat(entry.timestamp.unixNanos).isEqualTo(Timestamps.empty().unixNanos) in supportsMissingRealToElapsedTimeOffsetNs()
|
D | WindowManagerStateTest.kt | 60 Truth.assertThat(entry.timestamp.elapsedNanos).isEqualTo(100) in usesRealTimestampWhenAvailableAndFallsbackOnElapsedTimestamp() 61 Truth.assertThat(entry.timestamp.unixNanos).isEqualTo(600) in usesRealTimestampWhenAvailableAndFallsbackOnElapsedTimestamp() 84 Truth.assertThat(entry.timestamp.elapsedNanos).isEqualTo(100) in usesRealTimestampWhenAvailableAndFallsbackOnElapsedTimestamp() 85 Truth.assertThat(entry.timestamp.unixNanos).isEqualTo(Timestamps.empty().unixNanos) in usesRealTimestampWhenAvailableAndFallsbackOnElapsedTimestamp()
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/traces/surfaceflinger/ |
D | LayerTraceEntryBuilderTest.kt | 54 Truth.assertThat(entry.timestamp.elapsedNanos).isEqualTo(Timestamps.empty().elapsedNanos) in createsEntryWithCorrectClockTime() 55 Truth.assertThat(entry.timestamp.systemUptimeNanos).isEqualTo(100) in createsEntryWithCorrectClockTime() 56 Truth.assertThat(entry.timestamp.unixNanos).isEqualTo(600) in createsEntryWithCorrectClockTime() 71 Truth.assertThat(entry.timestamp.elapsedNanos).isEqualTo(Timestamps.empty().elapsedNanos) in supportsMissingRealToElapsedTimeOffsetNs() 72 Truth.assertThat(entry.timestamp.systemUptimeNanos).isEqualTo(100) in supportsMissingRealToElapsedTimeOffsetNs() 73 Truth.assertThat(entry.timestamp.unixNanos).isEqualTo(Timestamps.empty().unixNanos) in supportsMissingRealToElapsedTimeOffsetNs()
|
/platform_testing/libraries/flicker/src/android/tools/flicker/subject/exceptions/ |
D | ExceptionMessageBuilder.kt | 27 private var timestamp = Timestamps.empty() variable in android.tools.flicker.subject.exceptions.ExceptionMessageBuilder 34 setTimestamp(value.timestamp) in <lambda>() 54 fun setTimestamp(value: Timestamp) = apply { timestamp = value } in forInvalidElement() 78 if (!timestamp.isEmpty) { in <lambda>() 80 appendLine(timestamp.toString().prependIndent("\t")) in <lambda>()
|
/platform_testing/libraries/flicker/src/android/tools/flicker/subject/ |
D | FlickerSubject.kt | 25 abstract val timestamp: Timestamp constant in android.tools.flicker.subject.FlickerSubject 30 return CheckSubjectBuilder(this.timestamp, this.selfFacts, this.reader, lazyMessage) in check()
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/view/ |
D | ViewTrace.kt | 36 .dropWhile { it.timestamp < startTimestamp } in slice() 37 .dropLastWhile { it.timestamp > endTimestamp } in <lambda>()
|