Skip to content

[android] Fix flaky Android memory consumption measurements #4826

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

Open
matouskozak opened this issue Apr 10, 2025 · 0 comments
Open

[android] Fix flaky Android memory consumption measurements #4826

matouskozak opened this issue Apr 10, 2025 · 0 comments
Labels
bug Something isn't working Scenario

Comments

@matouskozak
Copy link
Member

We're seeing occasional crashes (locally and on CI) in Android memory consumption measurements

<HelixWorkItem Include="@(MAUIAndroidScenario -> 'Memory Consumption - %(Identity)')" Condition="!$(HelixTargetQueue.ToLowerInvariant().Contains('galaxy'))">
<PreCommands>echo on; xcopy %HELIX_CORRELATION_PAYLOAD%\$(PreparePayloadOutDirectoryName)\%(HelixWorkItem.ScenarioDirectoryName) %HELIX_WORKITEM_ROOT%\pub\ /E /I /Y</PreCommands>
<Command>$(Python) test.py devicememoryconsumption --device-type android --package-path pub\%(HelixWorkItem.ApkName).apk --package-name %(HelixWorkItem.PackageName) --scenario-name &quot;%(Identity)&quot; --runtime 30 --test-iteration 2 $(ScenarioArgs)</Command>
</HelixWorkItem>

Error message:

Traceback (most recent call last):
  File "D:\h\w\B9F509E3\w\ADFB098F\e\test.py", line 16, in <module>
    Runner(traits).run()
  File "D:\h\w\B9F509E3\p\shared\runner.py", line 482, in run
    raise Exception("Failed to capture the reported start time!")
Exception: Failed to capture the reported start time!

raised at

raise Exception("Failed to capture the reported start time!")

This is because the memory tracing isn't properly reporting the measured values:

[2025/04/10 06:53:55][INFO] Process summary:
[2025/04/10 06:53:55][INFO]   * com.companyname.mauiandroiddefault / u0a889 / v1:
[2025/04/10 06:53:55][INFO]          TOTAL: 99%
[2025/04/10 06:53:55][INFO]            Top: 99%

instead of

[2025/04/10 06:39:50][INFO] Process summary:
[2025/04/10 06:39:50][INFO]   * com.companyname.mauiandroiddefault / u0a4437 / v1:
[2025/04/10 06:39:50][INFO]          TOTAL: 99% (128MB-128MB-128MB/123MB-123MB-123MB/227MB-227MB-227MB over 1)
[2025/04/10 06:39:50][INFO]            Top: 99% (128MB-128MB-128MB/123MB-123MB-123MB/227MB-227MB-227MB over 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Scenario
Projects
None yet
Development

No branches or pull requests

1 participant