Skip to content

Commit 9c769f8

Browse files
authored
[Benchmarks] Copy run1 example from compose-multiplatform-core (#5206)
- replace images by non-AOSP ones - keep AOSP license header in code
1 parent 50b5708 commit 9c769f8

File tree

11 files changed

+1070
-1
lines changed

11 files changed

+1070
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ build/
1010
/captures
1111
.externalNativeBuild
1212
.cxx
13+
.kotlin
1314

1415
# Ignoring the persistant lockfile until kotlin.js vulnerabilities are fixed
1516
# yarn.lock # but absent yarn.lock leads to inconsistent builds on CI, so let's keep it

benchmarks/multiplatform/benchmarks/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ kotlin {
5454
implementation(compose.foundation)
5555
implementation(compose.material)
5656
implementation(compose.runtime)
57-
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
5857
implementation(compose.components.resources)
5958
}
6059
}
36.6 KB
Loading
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!--
2+
Copyright (C) 2022 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 at
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+
-->
16+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
17+
xmlns:tools="http://schemas.android.com/tools"
18+
tools:targetApi="21"
19+
android:width="24dp"
20+
android:height="24dp"
21+
android:viewportWidth="20"
22+
android:viewportHeight="20"
23+
android:tint="?android:attr/colorControlNormal"
24+
android:autoMirrored="true">
25+
<path
26+
android:fillColor="#FF000000"
27+
android:pathData="M6.0168,3.3333L6.5751,5.575L4.6668,7.4916C3.8751,5.7166 3.6001,4.1916
28+
3.4834,3.3333H6.0168ZM14.4251,13.375L16.6668,13.9416V16.5166C15.8084,16.4 14.2668,16.125
29+
12.4834,15.325L14.4251,13.375ZM6.3418,1.6666H2.5668C2.0918,1.6666 1.7001,2.0666
30+
1.7334,2.5416C2.4834,12.875 11.7668,18.275 17.5168,18.275C17.9668,18.275 18.3334,17.9
31+
18.3334,17.4416V13.6166C18.3334,13.0416 17.9418,12.5416
32+
17.3834,12.4083L14.5918,11.7083C14.2251,11.6166 13.7584,11.6833
33+
13.4084,12.0333L10.9251,14.5166C8.6751,13.1833 6.7918,11.3
34+
5.4668,9.0416L7.9168,6.5916C8.2251,6.2833 8.3501,5.8333
35+
8.2418,5.4083L7.5584,2.6166C7.4168,2.0583 6.9168,1.6666 6.3418,1.6666Z"/>
36+
</vector>
Lines changed: 1 addition & 0 deletions
Loading
17.2 KB
Loading
138 KB
Binary file not shown.
134 KB
Binary file not shown.

benchmarks/multiplatform/benchmarks/src/commonMain/kotlin/Benchmarks.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import androidx.compose.runtime.Composable
22
import benchmarks.animation.AnimatedVisibility
33
import benchmarks.complexlazylist.components.MainUiNoImageUseModel
4+
import benchmarks.example1.Example1
45
import benchmarks.lazygrid.LazyGrid
56
import benchmarks.visualeffects.NYContent
67
import kotlin.math.roundToInt
@@ -166,4 +167,5 @@ suspend fun runBenchmarks(
166167
runBenchmark("LazyGrid", width, height, targetFps, 1000, graphicsContext) { LazyGrid() }
167168
runBenchmark("VisualEffects", width, height, targetFps, 1000, graphicsContext) { NYContent(width, height) }
168169
runBenchmark("LazyList", width, height, targetFps, 1000, graphicsContext) { MainUiNoImageUseModel()}
170+
runBenchmark("Example1", width, height, targetFps, 1000, graphicsContext) { Example1() }
169171
}

0 commit comments

Comments
 (0)