| | 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) => |
| 0 | 20 | | other == value; |
| | 21 | |
|
| | 22 | | public void Set(float fpsCount, int hiccuptCount, float hiccupSum, float totalSeconds) => |
| 0 | 23 | | Set(new PerformanceMetricsData |
| | 24 | | { |
| | 25 | | fpsCount = fpsCount, hiccupCount = hiccuptCount, hiccupSum = hiccupSum, totalSeconds = totalSeconds |
| | 26 | | }); |
| | 27 | | } |
| | 28 | | } |