Nanotrace: Add connect to a tick

Task-number: QDS-11952
Change-Id: I07f075c7a556fc713ef56558a7a79a6bf68f2126
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2024-02-15 09:36:16 +01:00
parent edd8d442e5
commit effaff5365

View File

@@ -855,6 +855,10 @@ public:
void tick(ArgumentType, Arguments &&...)
{}
template<typename... Arguments>
void tick(const FlowTokenType &, ArgumentType, Arguments &&...)
{}
template<typename... Arguments>
FlowTokenType tickWithFlow(ArgumentType, Arguments &&...)
{
@@ -961,6 +965,19 @@ public:
}
}
template<typename... Arguments>
void tick(const FlowTokenType &flowToken, ArgumentType name, Arguments &&...arguments)
{
if (m_id) {
m_category().tick('n',
m_id,
std::move(name),
flowToken.bindId(),
IsFlow::In,
std::forward<Arguments>(arguments)...);
}
}
template<typename... Arguments>
FlowTokenType tickWithFlow(ArgumentType name, Arguments &&...arguments)
{
@@ -1151,6 +1168,8 @@ public:
m_category().tick('i', 0, name, m_bindId, IsFlow::In, std::forward<Arguments>(arguments)...);
}
std::size_t bindId() const { return m_bindId; }
private:
StringType m_name;
std::size_t m_bindId = 0;