Skip to content

Commit

Permalink
feat: ✨️ Add FrameCount
Browse files Browse the repository at this point in the history
  • Loading branch information
esnya committed Jan 5, 2025
1 parent 540f010 commit 6d1c37f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ResoniteMetricsCounter/Metrics/MetricsCounter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Elements.Core;
using Elements.Core;
using FrooxEngine;
using FrooxEngine.ProtoFlux;
using ResoniteMetricsCounter.Serialization;
Expand Down Expand Up @@ -35,6 +35,8 @@ public sealed class MetricsCounter : IDisposable
[JsonInclude] public long ElapsedMilliseconds => stopwatch.ElapsedMilliseconds;
public long ElapsedTicks => stopwatch.ElapsedTicks;

[JsonInclude] public int FrameCount { get; private set; }

public MetricsCounter(IEnumerable<string> blackList)
{
shouldSkip = new(ShouldSkipImpl);
Expand Down Expand Up @@ -163,4 +165,9 @@ internal void IgnoreHierarchy(Slot slot)
{
IgnoredHierarchy = slot;
}

internal void OnUpdate()
{
FrameCount++;
}
}

0 comments on commit 6d1c37f

Please sign in to comment.