diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /engine/cbenchmark.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'engine/cbenchmark.h')
| -rw-r--r-- | engine/cbenchmark.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/engine/cbenchmark.h b/engine/cbenchmark.h new file mode 100644 index 0000000..fc842ea --- /dev/null +++ b/engine/cbenchmark.h @@ -0,0 +1,53 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//===========================================================================// +#ifndef CBENCHMARK_H +#define CBENCHMARK_H + +#ifdef _WIN32 +#pragma once +#endif + + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +class CCommand; + + +#define MAX_BUFFER_SIZE 2048 + +//----------------------------------------------------------------------------- +// Purpose: Holds benchmark data & state +//----------------------------------------------------------------------------- +class CBenchmarkResults +{ +public: + CBenchmarkResults(); + + bool IsBenchmarkRunning(); + void StartBenchmark( const CCommand &args ); + void StopBenchmark(); + void SetResultsFilename( const char *pFilename ); + void Upload(); + +private: + bool m_bIsTestRunning; + char m_szFilename[256]; + + int m_flStartTime; + int m_iStartFrame; +}; + +inline CBenchmarkResults *GetBenchResultsMgr() +{ + extern CBenchmarkResults g_BenchmarkResults; + return &g_BenchmarkResults; +} + + +#endif // CBENCHMARK_H |