Commit Graph

11 Commits

Author SHA1 Message Date
Srivats P
ee45aaf0eb Change StreamTiming::TxRxKey format
The format now matches the ttag list format input in recordTxTime() making
that API a little more optimized.
2023-06-17 12:14:18 +05:30
Srivats P
bef0f1d162 Make stream timing recordTx/Rx APIs inline 2023-06-15 12:56:53 +05:30
Srivats P
598e6bf243 Merge changes made in base code for turbo/latency 2023-06-15 12:32:20 +05:30
Srivats P
4ba98cc520 Fix latency timers not getting started/stopped
In a previous commit, we start/stop these timers based on number of
ports tracking stream stats triggered by RPCs. However, timers cannot
be triggered across threads (RPC thread and main thread in this case).

This fix uses a queued connection to post it to the other queue.
2023-05-26 11:31:52 +05:30
Srivats P
4426a51d0f Run stream latency timers only when required
Required => At least one port is tracking stream stats

Also changed some optimization FIXMEs as TODOs
2023-05-26 11:31:52 +05:30
Srivats P
3c6632b6a2 Remove comment about trying read-write lock
The stream timingHash is read by getStreamStats() while it is read/write
for processRecords(), the latter is a more frequent operation so there's
no real benefit of using a read-write lock instead of simple mutex.
2023-05-26 11:31:52 +05:30
Srivats P
d3be505a0c Make app QObject parent of StreamTiming singleton 2023-05-26 11:31:52 +05:30
Srivats P
5540253e61 Fix StreamTiming TxRxKey
makeKey was incorrect by mistake
2023-05-26 11:31:52 +05:30
Srivats P
ab713ce043 Integrate StreamTiming with the code
Bugs found during integration were fixed and minor code improvements were made
such as using consts, const params, renaming members etc.
2023-05-26 11:31:52 +05:30
Srivats P
fc2d8408fa Change StreamTiming::timing_ from QList to QHash
Using QList meant we need to know the port count in the constructor - which is
difficult to know because StreamTiming is designed as a singleton
2023-05-26 11:31:52 +05:30
Srivats P
39c8d6f5f3 Add initial cut of StreamTiming class
This singleton class will keep track of Ttag timing across all ports and GUIDs.

A bunch of FIXMEs/TODOs are pending for this class implementation; also this
class has not been hooked up to the rest of the code yet.
2023-05-26 11:31:52 +05:30