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

Add basic microbenchmarks for algorithm #2285

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

alexvanyo
Copy link
Owner

Fixes #1761

Copy link

codecov bot commented Jan 2, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
16385 1 16384 11
View the full list of 1 ❄️ flaky tests
com.alexvanyo.composelife.ui.app.InteractiveCellUniverseTests six_long_line_evolves_correctly_with_step

Flake rate in main: 9.38% (Passed 58 times, Failed 6 times)

Stack Traces | 15.8s run time
java.lang.IllegalArgumentException: Detected multithreaded access to SnapshotStateObserver: previousThreadId=113), currentThread={id=1, name=main}. Note that observation on multiple threads in layout/draw is not supported. Make sure your measure/layout/draw for each Owner (AndroidComposeView) is executed on the same thread.
	at androidx.compose.runtime.PreconditionsKt.throwIllegalArgumentException(Preconditions.kt:26)
	at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:646)
	at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:124)
	at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke(NodeCoordinator.kt:474)
	at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke(NodeCoordinator.kt:470)
	at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke(GraphicsLayerOwnerLayer.android.kt:261)
	at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke(GraphicsLayerOwnerLayer.android.kt:259)
	at androidx.compose.ui.graphics.layer.GraphicsLayer$clipDrawBlock$1.invoke(AndroidGraphicsLayer.android.kt:72)
	at androidx.compose.ui.graphics.layer.GraphicsLayer$clipDrawBlock$1.invoke(AndroidGraphicsLayer.android.kt:67)
	at androidx.compose.ui.graphics.layer.GraphicsLayerV23.record(GraphicsLayerV23.android.kt:468)
	at androidx.compose.ui.graphics.layer.GraphicsLayer.recordInternal(AndroidGraphicsLayer.android.kt:438)
	at androidx.compose.ui.graphics.layer.GraphicsLayer.record-mL-hObY(AndroidGraphicsLayer.android.kt:431)
	at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.updateDisplayList(GraphicsLayerOwnerLayer.android.kt:254)
	at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(AndroidComposeView.android.kt:1671)
	at android.view.View.draw(View.java:16181)
	at android.view.View.updateDisplayListIfDirty(View.java:15174)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
	at android.view.View.updateDisplayListIfDirty(View.java:15134)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
	at android.view.View.updateDisplayListIfDirty(View.java:15134)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
	at android.view.View.updateDisplayListIfDirty(View.java:15134)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
	at android.view.View.updateDisplayListIfDirty(View.java:15134)
	at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:281)
	at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:287)
	at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:322)
	at android.view.ViewRootImpl.draw(ViewRootImpl.java:2615)
	at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2434)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2067)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
	at android.view.Choreographer.doCallbacks(Choreographer.java:670)
	at android.view.Choreographer.doFrame(Choreographer.java:606)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5417)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@alexvanyo alexvanyo force-pushed the av/algorithm-microbenchmark branch 7 times, most recently from fb8911d to 3e5d788 Compare January 6, 2025 18:29
@alexvanyo alexvanyo force-pushed the av/algorithm-microbenchmark branch 4 times, most recently from 9bd2a85 to 735b6fb Compare January 13, 2025 19:16
@alexvanyo alexvanyo enabled auto-merge (rebase) January 13, 2025 19:16
@alexvanyo alexvanyo force-pushed the av/algorithm-microbenchmark branch from 735b6fb to 32a48a0 Compare January 13, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add microbenchmarking to algorithms
1 participant