Merge pull request #85 from kaiscode/fix-import

Fix timestamp calculation in chrome tracing importer
This commit is contained in:
Bartosz Taudul 2020-08-10 12:05:03 +02:00 committed by GitHub
commit 900fbe5df8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,7 @@ int main( int argc, char** argv )
{
const auto tid = v["tid"].get<uint64_t>();
const auto ts0 = uint64_t( v["ts"].get<double>() * 1000. );
const auto ts1 = v["dur"].is_object() ? ts0 + uint64_t( v["dur"].get<double>() * 1000. ) : ts0;
const auto ts1 = ts0 + uint64_t( v["dur"].get<double>() * 1000. );
const auto name = v["name"].get<std::string>();
timeline.emplace_back( tracy::Worker::ImportEventTimeline { tid, ts0, name, std::move(zoneText), false } );
timeline.emplace_back( tracy::Worker::ImportEventTimeline { tid, ts1, "", "", true } );