Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android benchmark frame time without loading #11

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
94efc95
Android benchmark frame time.
alexcristici Dec 14, 2023
c0c5790
Merge branch 'main' into android-benchmark-frame-time
alexcristici Dec 14, 2023
daecb3d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 14, 2023
0eb8bb6
Added rendering time.
alexcristici Dec 14, 2023
7cc0ef6
Fix
alexcristici Dec 14, 2023
9f762f3
Removed fps reports.
alexcristici Dec 14, 2023
ebbbe98
Fix compilation
louwers Dec 14, 2023
666a0b8
Include encoding and render time in jsonPayload
louwers Dec 14, 2023
7ebd1f8
Merge branch 'main' into android-benchmark-frame-time
alexcristici Dec 18, 2023
f5f433a
Merge branch 'main' into android-benchmark-frame-time
alexcristici Dec 19, 2023
407b9f5
Merge branch 'main' into android-benchmark-frame-time
alexcristici Jan 3, 2024
356583e
Merge branch 'main' into android-benchmark-frame-time
alexcristici Jan 5, 2024
b4d4678
Merge branch 'main' into android-benchmark-frame-time
alexcristici Jan 8, 2024
43d9c31
Merge branch 'main' into android-benchmark-frame-time
alexcristici Jan 9, 2024
b79d3e8
Merge branch 'main' into android-benchmark-frame-time
alexcristici Jan 11, 2024
577c81e
Merge branch 'main' into android-benchmark-frame-time
alexcristici Jan 16, 2024
64e38ff
Compute only frames time that have the map fully loaded.
alexcristici Jan 16, 2024
b63111e
Merge branch 'main' into android-benchmark-frame-time-without-loading
alexcristici Jan 17, 2024
0b9ae31
Merge branch 'main' into android-benchmark-frame-time
alexcristici Jan 17, 2024
59ed430
Merge branch 'main' into android-benchmark-frame-time-without-loading
alexcristici Jan 25, 2024
72e1b4b
Merge branch 'main' into android-benchmark-frame-time
alexcristici Jan 25, 2024
fcaf507
Merge branch 'main' into android-benchmark-frame-time-without-loading
alexcristici Jan 30, 2024
7407f23
Merge branch 'main' into android-benchmark-frame-time
alexcristici Jan 30, 2024
fb2c2e9
Merge branch 'main' into android-benchmark-frame-time
alexcristici Jan 30, 2024
7d9d986
Merge branch 'main' into android-benchmark-frame-time
alexcristici Jan 31, 2024
526412d
Merge branch 'main' into android-benchmark-frame-time-without-loading
alexcristici Jan 31, 2024
ac588df
Merge branch 'android-benchmark-frame-time' into android-benchmark-fr…
alexcristici Jan 31, 2024
7e098bb
Merge branch 'main' into android-benchmark-frame-time
alexcristici Feb 1, 2024
deb5517
Fix Android test.
alexcristici Feb 1, 2024
24e6145
Exposed setSwapBehavior.
alexcristici Feb 1, 2024
724fc3f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 1, 2024
43b04fa
Added measureFrameTime variable to enable time measure instead of fps.
alexcristici Feb 1, 2024
17b82df
Merge branch 'main' into android-benchmark-frame-time
alexcristici Feb 1, 2024
2fc70ec
Merge branch 'android-benchmark-frame-time' into android-benchmark-fr…
alexcristici Feb 1, 2024
4eb37fd
Merge branch 'main' into android-benchmark-frame-time-without-loading
alexcristici Feb 1, 2024
c7ccef9
Merge branch 'main' into android-benchmark-frame-time-without-loading
alexcristici Feb 2, 2024
b73cfc7
Fix after merge.
alexcristici Feb 2, 2024
8a55d72
Merge branch 'main' into android-benchmark-frame-time-without-loading
alexcristici Feb 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ void initialise(@NonNull Context context, @NonNull MapLibreMapOptions options) {
setPrefetchesTiles(options);
}

public boolean isFullyLoaded() {
return nativeMapView.isFullyLoaded();
}

/**
* Get the Style of the map asynchronously.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class BenchmarkActivity : AppCompatActivity() {
private val TAG = "BenchmarkActivity"

private lateinit var mapView: MapView
private lateinit var maplibreMap: MapLibreMap
private var handler: Handler? = null
private var delayed: Runnable? = null
private var fpsStore = FpsStore()
Expand Down Expand Up @@ -207,11 +208,14 @@ class BenchmarkActivity : AppCompatActivity() {
mapView = findViewById<View>(R.id.mapView) as MapView
if (measureFrameTime) {
mapView.addOnDidFinishRenderingFrameListener { fully: Boolean, frameEncodingTime: Double, frameRenderingTime: Double ->
encodingTimeStore.add(frameEncodingTime * 1e3)
renderingTimeStore.add(frameRenderingTime * 1e3)
if (maplibreMap.isFullyLoaded()) {
encodingTimeStore.add(frameEncodingTime * 1e3)
renderingTimeStore.add(frameRenderingTime * 1e3)
}
}
}
mapView.getMapAsync { maplibreMap: MapLibreMap ->
this.maplibreMap = maplibreMap
maplibreMap.setStyle(inputData.styleURLs[0])
maplibreMap.setSwapBehaviorFlush(measureFrameTime)
if (!measureFrameTime) {
Expand Down