https://github.com/perfectomobilesa/benchmarksample
https://github.com/perfectomobilesa/benchmarksample
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/perfectomobilesa/benchmarksample
- Owner: PerfectoMobileSA
- License: apache-2.0
- Created: 2022-01-28T11:00:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-01T15:01:26.000Z (over 4 years ago)
- Last Synced: 2024-12-30T20:15:12.875Z (over 1 year ago)
- Language: Kotlin
- Size: 1.87 MB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Android Performance
===================================
Benchmark samples using the shiny new [Jetpack Benchmark library](https://d.android.com/benchmark).
## [BenchmarkSample](BenchmarkSample)
This sample shows how to use the Benchmark library to benchmark code and UI from
library modules.
To run the sample: `./gradlew benchmark:cC`
## [BenchmarkNdkSample (Prototype!)](BenchmarkNdkSample)
### Important Notes
* Make sure your device's screen is on before running benchmarks
* Don't forget to checkout submodules: `git submodule update --init --recursive`
This prototype sample shows how to use the Benchmark library together with the
NDK, and [google/benchmark](https://github.com/google/benchmark) to benchmark
C++ code, while getting the Android-specific performance stability, and Studio
integration from the Jetpack Benchmark library.
To run the sample: `./gradlew benchmark:cC`
## [Macrobenchmark](MacrobenchmarkSample)
This sample shows how to use the MacrobenchmarkSample library for testing application startup and runtime performance cases, such as scrolling a `RecyclerView` to measure jank.
The sample also includes a [GitHub workflow](.github/workflows/firebase_test_lab.yml) to run Macrobenchmarks on Firebase Test Lab. For more information refer to the [README.md](MacrobenchmarkSample/ftl/README.md).
To run the sample: `./gradlew macrobenchmark:cC`
## [ConstraintLayout performance comparison](ConstraintLayoutPerformance)
This sample compares how different ViewGroups
(ConstraintLayout vs traditional layouts) affect the UI performance.
To run the sample: `./gradlew benchmark:cC`
### Reporting Issues
You can report an [Issue with a
sample](https://github.com/googlesamples/android-performance/issues) using this
repository. If you find an issue with the Benchmark library, report it using the
[Android Benchmark Issue
Tracker](https://issuetracker.google.com/issues/new?component=585351&template=1235073)
### Additional Resources
[PagingWithNetworkSample](https://github.com/googlesamples/android-architecture-components/tree/master/PagingWithNetworkSample) - Example of benchmarking an androidx.paging backed RecyclerView
[WorkManagerSample](https://github.com/googlesamples/android-architecture-components/tree/master/WorkManagerSample) - Example of benchmarking asynchronously scheduled background work
License
-------
Copyright 2019 The Android Open Source Project, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.