1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Calculate compare traces average, median.

This commit is contained in:
Bartosz Taudul
2018-09-03 20:34:07 +02:00
parent b485aad2a3
commit fc40c7bbf6
2 changed files with 54 additions and 3 deletions
+18
View File
@@ -367,9 +367,27 @@ private:
bool normalize = false;
int64_t numBins = -1;
std::unique_ptr<CompVal[]> bins, binTime;
std::vector<int64_t> sorted[2];
size_t sortedNum[2] = { 0, 0 };
float average[2];
float median[2];
int64_t total[2];
void ResetSelection()
{
for( int i=0; i<2; i++ )
{
sorted[i].clear();
sortedNum[i] = 0;
average[i] = 0;
median[i] = 0;
total[i] = 0;
}
}
void Reset()
{
ResetSelection();
for( int i=0; i<2; i++ )
{
match[i].clear();