2using System.Collections.Generic;
47 this.benchmarkStack =
new Stack<BenchmarkDescription>();
50 private void OnEnable()
54 this.numTotalDispatches = 0;
57 this.numTotalDispatches += workList.
dispatches.Count;
59 this.numTotalFinishedDispatches = 0;
61 this.currentBenchmark = this.benchmarkStack.Pop();
62 this.numCurBenchmarkFinishedDispatches = 0;
63 this.numCurBenchmarkDispatches = this.currentBenchmark.
dispatches.Count;
66 launchParameters: this.currentBenchmark.
dispatches.Pop(),
67 videoPlayer:
this.GetComponent<UnityEngine.Video.VideoPlayer>(),
70 logType:
this.currentBenchmark.logType,
77 private void OnFinishedRunner()
79 this.measurementRunner.
Dispose();
81 if (this.currentBenchmark.
dispatches.Count == 0)
83 System.IO.File.WriteAllText(
84 $
"Reports/{this.currentBenchmark.name}.json",
85 JsonUtility.ToJson(
this.reportCollection)
88 if (this.benchmarkStack.Count == 0)
94 this.currentBenchmark = this.benchmarkStack.Pop();
95 this.numCurBenchmarkFinishedDispatches = 0;
96 this.numCurBenchmarkDispatches = this.currentBenchmark.
dispatches.Count;
102 launchParameters: this.currentBenchmark.
dispatches.Pop(),
103 videoPlayer:
this.GetComponent<UnityEngine.Video.VideoPlayer>(),
106 logType:
this.currentBenchmark.logType,
114 private void Update() { }
116 private void OnRenderImage(RenderTexture src, RenderTexture dest)
134 if (this.measurementRunner.
finished ==
true)
137 this.OnFinishedRunner();
138 this.numCurBenchmarkFinishedDispatches++;
139 this.numTotalFinishedDispatches++;
readonly Stack< LaunchParameters > dispatches
List< BenchmarkReport > reports
int numCurBenchmarkDispatches
const int maxNumClusters
Must match the shader.
BenchmarkDescription currentBenchmark
int numTotalFinishedDispatches
const int fullTextureSize
int numCurBenchmarkFinishedDispatches
const int kernelSize
Must match the shader.
Stack< BenchmarkDescription > benchmarkStack
const string varianceLogPath
ComputeShader csHighlightRemoval
Call Dispose after using.
BenchmarkReport GetReport()
void ProcessNextFrame(RenderTexture src, RenderTexture dst)