From 9308d7964c8734cdb09003febc9967c69b5e7e7f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 24 Jun 2018 17:55:05 +0200 Subject: [PATCH] Callstack capture timing test. --- test/test.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/test.cpp b/test/test.cpp index fe6af1cc..2c184e0c 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -195,6 +195,20 @@ void SharedWrite2() } } +void CaptureCallstack() +{ + ZoneScopedS( 10 ); +} + +void CallstackTime() +{ + for(;;) + { + std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) ); + CaptureCallstack(); + } +} + int main() { auto t1 = std::thread( TestFunction ); @@ -215,6 +229,7 @@ int main() auto t16 = std::thread( SharedRead2 ); auto t17 = std::thread( SharedWrite1 ); auto t18 = std::thread( SharedWrite2 ); + auto t19 = std::thread( CallstackTime ); tracy::SetThreadName( t1, "First thread" ); tracy::SetThreadName( t2, "Second thread" ); @@ -234,6 +249,7 @@ int main() tracy::SetThreadName( t16, "Shared read 3" ); tracy::SetThreadName( t17, "Shared write 1" ); tracy::SetThreadName( t18, "Shared write 2" ); + tracy::SetThreadName( t19, "Callstack time" ); for(;;) {