mirror of
https://github.com/wolfpld/tracy.git
synced 2024-12-02 09:44:35 +00:00
Calculate plot values sum during data import.
This commit is contained in:
parent
facd2be33b
commit
04db76d5fd
@ -442,6 +442,7 @@ Worker::Worker( const char* name, const char* program, const std::vector<ImportE
|
|||||||
plot->type = PlotType::User;
|
plot->type = PlotType::User;
|
||||||
plot->format = v.format;
|
plot->format = v.format;
|
||||||
|
|
||||||
|
double sum = 0;
|
||||||
double min = v.data.begin()->second;
|
double min = v.data.begin()->second;
|
||||||
double max = v.data.begin()->second;
|
double max = v.data.begin()->second;
|
||||||
plot->data.reserve_exact( v.data.size(), m_slab );
|
plot->data.reserve_exact( v.data.size(), m_slab );
|
||||||
@ -453,9 +454,11 @@ Worker::Worker( const char* name, const char* program, const std::vector<ImportE
|
|||||||
idx++;
|
idx++;
|
||||||
if( min > p.second ) min = p.second;
|
if( min > p.second ) min = p.second;
|
||||||
else if( max < p.second ) max = p.second;
|
else if( max < p.second ) max = p.second;
|
||||||
|
sum += p.second;
|
||||||
}
|
}
|
||||||
plot->min = min;
|
plot->min = min;
|
||||||
plot->max = max;
|
plot->max = max;
|
||||||
|
plot->sum = sum;
|
||||||
|
|
||||||
m_data.plots.Data().push_back( plot );
|
m_data.plots.Data().push_back( plot );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user