Replace duplicate samples.

This commit is contained in:
Bartosz Taudul 2020-02-22 21:36:27 +01:00
parent 26b13abac8
commit 90277953c7

View File

@ -4621,10 +4621,14 @@ void Worker::ProcessCallstackSample( const QueueCallstackSample& ev )
}
else
{
if( td->samples.back().time.Val() <= t )
if( td->samples.back().time.Val() < t )
{
td->samples.push_back_non_empty( sd );
}
else if( td->samples.back().time.Val() == t )
{
td->samples.back() = sd;
}
else
{
const auto it = std::lower_bound( td->samples.begin(), td->samples.end(), t, [] ( const auto& l, const auto& r ) { return l.time.Val() < r; } );