NetworkProfile.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Copyright (c) 2002-2012 Croteam Ltd.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of version 2 of the GNU General Public License as published by
  4. the Free Software Foundation
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License along
  10. with this program; if not, write to the Free Software Foundation, Inc.,
  11. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
  12. #ifndef __ENGINE_BASE_PROFILING_H__
  13. #include <Engine/Base/Profiling.h>
  14. #endif
  15. /* Class for holding profiling information for network. */
  16. class CNetworkProfile : public CProfileForm {
  17. public:
  18. // indices for profiling counters and timers
  19. enum ProfileTimerIndex {
  20. PTI_MAINLOOP, // time spent in main game loop
  21. PTI_TIMERLOOP, // time spent in timer game loop
  22. PTI_SERVER_LOOP, // time server spent processing messages
  23. PTI_SESSIONSTATE_LOOP, // time session state spent processing messages
  24. PTI_SESSIONSTATE_PROCESSGAMESTREAM, // time session state spent processing gamestream (includes physics)
  25. PTI_SENDMESSAGE, // time spend sending message
  26. PTI_RECEIVEMESSAGE, // time spend receiving message
  27. PTI_COUNT
  28. };
  29. enum ProfileCounterIndex {
  30. PCI_GAMESTREAMRESENDS, // how many times gamestream block was resent from server
  31. PCI_GAMESTREAM_BYTES_SENT, // bytes sent in gamestream messages
  32. PCI_GAMESTREAM_BYTES_RECEIVED, // bytes received in gamestream messages
  33. PCI_ACTION_BYTES_SENT, // bytes sent in action messages
  34. PCI_ACTION_BYTES_RECEIVED, // bytes received in action messages
  35. PCI_MESSAGESSENT, // total number of messages sent
  36. PCI_MESSAGESRECEIVED, // total number of messages received
  37. PCI_BYTESSENT, // total number of bytes sent
  38. PCI_BYTESRECEIVED, // total number of bytes received
  39. PCI_COUNT
  40. };
  41. // constructor
  42. CNetworkProfile(void);
  43. };