Add support for bottleneck stats

This commit is contained in:
Lauri Kasanen
2020-09-21 15:51:56 +03:00
parent 45e44a66e5
commit d5bdef121a
11 changed files with 164 additions and 4 deletions

View File

@@ -178,6 +178,8 @@ namespace rfb {
virtual void supportsContinuousUpdates();
virtual void supportsLEDState();
virtual void sendStats();
// setAccessRights() allows a security package to limit the access rights
// of a VNCSConnectioST to the server. These access rights are applied
// such that the actual rights granted are the minimum of the server's
@@ -235,6 +237,18 @@ namespace rfb {
std::map<rdr::U32, rdr::U32> pressedKeys;
enum {
BS_CPU_CLOSE,
BS_CPU_SLOW,
BS_NET_SLOW,
BS_FRAME,
BS_NUM
};
std::list<struct timeval> bstats[BS_NUM]; // Bottleneck stats
rdr::U64 bstats_total[BS_NUM];
struct timeval connStart;
time_t lastEventTime;
time_t pointerEventTime;
Point pointerEventPos;