Open szabototo89 opened 10 years ago
However this solution would solve this problem:
[PerformanceTest]
public void MeasureCodeTest() {
CodePerformance.Measure(() => {
Time.BeginMeasure("DoSomething1"); // start measuring of DoSomething1
DoSomething1();
Time.EndMeasure();
// ...
Time.BeginMeasure("DoSomethingN"); // start measuring of DoSomethingN
DoSomethingN();
Time.EndMeasure();
});
}
CPTL should be a performance testing library in C#. It should run and measure the execution time of source code:
The above code will compile to:
Possible problems: Handle statements such as: branches, loops or declarations.