Skip to content

Commit

Permalink
Skip CPU time on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejgordon authored and tarekgh committed Jul 30, 2024
1 parent 7156ef1 commit 0c3145d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void GcCollectionsCount()
}
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMobile))]
public void CpuTime()
{
using InstrumentRecorder<double> instrumentRecorder = new("dotnet.process.cpu.time");
Expand All @@ -125,7 +125,7 @@ public void CpuTime()

bool[] foundCpuModes = [false, false];

foreach (Measurement<double> measurement in instrumentRecorder.GetMeasurements().Where(m => m.Value >= 0))
foreach (Measurement<double> measurement in instrumentRecorder.GetMeasurements())
{
var tags = measurement.Tags.ToArray();
var tag = tags.SingleOrDefault(k => k.Key == "cpu.mode");
Expand Down

0 comments on commit 0c3145d

Please sign in to comment.