NetworkProfile.cpp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #include "stdh.h"
  13. #include <Engine/Network/NetworkProfile.h>
  14. // profile form for profiling world editing
  15. CNetworkProfile npNetworkProfile;
  16. CProfileForm &_pfNetworkProfile = npNetworkProfile;
  17. CNetworkProfile::CNetworkProfile(void)
  18. : CProfileForm("Network", "ticks",
  19. CNetworkProfile::PCI_COUNT, CNetworkProfile::PTI_COUNT)
  20. {
  21. // initialize network profile form
  22. SETTIMERNAME(CNetworkProfile::PTI_MAINLOOP, "MainLoop()", "");
  23. SETTIMERNAME(CNetworkProfile::PTI_TIMERLOOP, "TimerLoop()", "");
  24. SETTIMERNAME(CNetworkProfile::PTI_SERVER_LOOP, "ServerLoop()", "");
  25. SETTIMERNAME(CNetworkProfile::PTI_SESSIONSTATE_LOOP, "SessionStateLoop()", "");
  26. SETTIMERNAME(CNetworkProfile::PTI_SESSIONSTATE_PROCESSGAMESTREAM, "CSessionState::ProcessGameStream()", "");
  27. SETTIMERNAME(CNetworkProfile::PTI_SENDMESSAGE, "Send()", "");
  28. SETTIMERNAME(CNetworkProfile::PTI_RECEIVEMESSAGE, "Receive()", "");
  29. SETCOUNTERNAME(CNetworkProfile::PCI_GAMESTREAMRESENDS, "game stream resends");
  30. SETCOUNTERNAME(CNetworkProfile::PCI_GAMESTREAM_BYTES_SENT, "gamestream bytes sent");
  31. SETCOUNTERNAME(CNetworkProfile::PCI_GAMESTREAM_BYTES_RECEIVED, "gamestream bytes received");
  32. SETCOUNTERNAME(CNetworkProfile::PCI_ACTION_BYTES_SENT, "action bytes sent");
  33. SETCOUNTERNAME(CNetworkProfile::PCI_ACTION_BYTES_RECEIVED, "action bytes received");
  34. SETCOUNTERNAME(CNetworkProfile::PCI_MESSAGESSENT, "messages sent");
  35. SETCOUNTERNAME(CNetworkProfile::PCI_MESSAGESRECEIVED, "messages received");
  36. SETCOUNTERNAME(CNetworkProfile::PCI_BYTESSENT, "bytes sent");
  37. SETCOUNTERNAME(CNetworkProfile::PCI_BYTESRECEIVED, "bytes received");
  38. }