1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Track trace loading progress.

This commit is contained in:
Bartosz Taudul
2018-07-28 17:59:17 +02:00
parent 1b785befa2
commit 0bf0ceed3d
2 changed files with 44 additions and 1 deletions
+10
View File
@@ -45,6 +45,12 @@ struct UnsupportedVersion : public std::exception
int version;
};
struct LoadProgress
{
std::atomic<uint64_t> total = 0;
std::atomic<uint64_t> progress = 0;
};
class Worker
{
public:
@@ -221,6 +227,8 @@ public:
void Write( FileWrite& f );
static const LoadProgress& GetLoadProgress() { return s_loadProgress; }
private:
void Exec();
void ServerQuery( uint8_t type, uint64_t data );
@@ -362,6 +370,8 @@ private:
DataBlock m_data;
MbpsBlock m_mbpsData;
static LoadProgress s_loadProgress;
};
}