Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //===========================================================================//
  8. #ifndef CBENCHMARK_H
  9. #define CBENCHMARK_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. //-----------------------------------------------------------------------------
  14. // Forward declarations
  15. //-----------------------------------------------------------------------------
  16. class CCommand;
  17. #define MAX_BUFFER_SIZE 2048
  18. //-----------------------------------------------------------------------------
  19. // Purpose: Holds benchmark data & state
  20. //-----------------------------------------------------------------------------
  21. class CBenchmarkResults
  22. {
  23. public:
  24. CBenchmarkResults();
  25. bool IsBenchmarkRunning();
  26. void StartBenchmark( const CCommand &args );
  27. void StopBenchmark();
  28. void SetResultsFilename( const char *pFilename );
  29. void Upload();
  30. private:
  31. bool m_bIsTestRunning;
  32. char m_szFilename[256];
  33. int m_flStartTime;
  34. int m_iStartFrame;
  35. };
  36. inline CBenchmarkResults *GetBenchResultsMgr()
  37. {
  38. extern CBenchmarkResults g_BenchmarkResults;
  39. return &g_BenchmarkResults;
  40. }
  41. #endif // CBENCHMARK_H