mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add support for custom text in ImportEventTimeline.
This commit is contained in:
@@ -76,6 +76,7 @@ int main( int argc, char** argv )
|
||||
v["tid"].get<uint64_t>(),
|
||||
uint64_t( v["ts"].get<double>() * 1000. ),
|
||||
v["name"].get<std::string>(),
|
||||
"",
|
||||
false
|
||||
} );
|
||||
}
|
||||
@@ -85,6 +86,7 @@ int main( int argc, char** argv )
|
||||
v["tid"].get<uint64_t>(),
|
||||
uint64_t( v["ts"].get<double>() * 1000. ),
|
||||
"",
|
||||
"",
|
||||
true
|
||||
} );
|
||||
}
|
||||
@@ -94,8 +96,8 @@ int main( int argc, char** argv )
|
||||
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 name = v["name"].get<std::string>();
|
||||
timeline.emplace_back( tracy::Worker::ImportEventTimeline { tid, ts0, name, false } );
|
||||
timeline.emplace_back( tracy::Worker::ImportEventTimeline { tid, ts1, "", true } );
|
||||
timeline.emplace_back( tracy::Worker::ImportEventTimeline { tid, ts0, name, "", false } );
|
||||
timeline.emplace_back( tracy::Worker::ImportEventTimeline { tid, ts1, "", "", true } );
|
||||
}
|
||||
else if( type == "i" || type == "I" )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user