Counter Strike : Global Offensive Source Code
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.

46 lines
1.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef PERFWIZARD_H
  9. #define PERFWIZARD_H
  10. //--------------------------------------------------------------------------------------------------------------
  11. /**
  12. * Tracks the non-server FPS, for performance monitoring.
  13. * This is used for a wizard to suggest video option fallbacks to improve performance.
  14. */
  15. class ClientFPSTracker
  16. {
  17. public:
  18. ClientFPSTracker();
  19. void Reset( void );
  20. void WriteData( void ) const;
  21. void MarkFrame( float fps, float input, float client, float server, float render, float sound, float cl_dll, float exec );
  22. bool IsValid( void ) const;
  23. void NPrint( int line ) const;
  24. private:
  25. float m_validTime;
  26. double m_minNonServerFPS;
  27. double m_maxNonServerFPS;
  28. double m_nonServerFPSAverage;
  29. double m_minAvgNonServerFPS;
  30. double m_maxAvgNonServerFPS;
  31. };
  32. extern ClientFPSTracker g_ClientFPSTracker;
  33. //--------------------------------------------------------------------------------------------------------------
  34. #endif // PERFWIZARD_H