| | 1 | | using System; |
| | 2 | | using UnityEngine; |
| | 3 | |
|
| | 4 | | namespace DCL |
| | 5 | | { |
| | 6 | | [Serializable] |
| | 7 | | public class PerformanceMetricsData |
| | 8 | | { |
| | 9 | | public float fpsCount; |
| | 10 | | public int hiccupCount; |
| | 11 | | public float hiccupSum; |
| | 12 | | public float totalSeconds; |
| | 13 | | } |
| | 14 | |
|
| | 15 | | [CreateAssetMenu(fileName = "PerformanceMetricsDataVariable", |
| | 16 | | menuName = "Variables/PerformanceMetricsDataVariable")] |
| | 17 | | public class PerformanceMetricsDataVariable : BaseVariableAsset<PerformanceMetricsData> |
| | 18 | | { |
| | 19 | | public override bool Equals(PerformanceMetricsData other) |
| | 20 | | { |
| 0 | 21 | | return other == value; |
| | 22 | | } |
| | 23 | |
|
| | 24 | | public void Set(float fpsCount, int hiccuptCount, float hiccupSum, float totalSeconds) |
| | 25 | | { |
| 0 | 26 | | Set(new PerformanceMetricsData |
| | 27 | | {fpsCount = fpsCount, hiccupCount = hiccuptCount, hiccupSum = hiccupSum, totalSeconds = totalSeconds}); |
| 0 | 28 | | } |
| | 29 | | } |
| | 30 | | } |