From 90277953c750f23ed0f4d7bdf453de5e891ebf55 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 22 Feb 2020 21:36:27 +0100 Subject: [PATCH] Replace duplicate samples. --- server/TracyWorker.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 90a51ab9..c40aaa0f 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -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; } );