+
Skip to content

Conversation

DariaKunoichi
Copy link
Contributor

Goal

We shouldn’t send CPU metrics if there is no cpu_mean_total due to it being unavailable on the device.

Changeset

If processSampleCount is zero that means that cpu_mean_total cannot be calculated.
So we check for it early and don't calculate any other cpu related attribute.

Testing

Added new unit tests with cpu_mean_total being unavailable.
Adjusted existing tests that checked main thread only and overhead only.

@DariaKunoichi DariaKunoichi requested a review from lemnik July 1, 2025 18:40
@DariaKunoichi DariaKunoichi self-assigned this Jul 1, 2025
Copy link

github-actions bot commented Jul 1, 2025

BugsnagPerformance.framework binary size did not change - 660,696 bytes

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +12  +0.0%     +12    [__TEXT]
  -0.0%     -12  -0.0%     -12    __TEXT,__text
  [ = ]       0  [ = ]       0    TOTAL

Generated by 🚫 Danger

@DariaKunoichi DariaKunoichi merged commit b614553 into next Jul 2, 2025
26 checks passed
@DariaKunoichi DariaKunoichi deleted the PLAT-14391-dontsendcpu branch July 2, 2025 09:19
@DariaKunoichi DariaKunoichi mentioned this pull request Aug 14, 2025
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.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载