mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 20:25:54 +01:00
24cb244d43
This was a _ton_ of changes, made 15 years ago, so there are probably some problems to work out still. Among others: Engine/Base/Stream.* was mostly abandoned and will need to be re-ported. Still, this is a pretty good start, and probably holds a world record for lines of changes or something. :)
50 lines
1.7 KiB
C++
50 lines
1.7 KiB
C++
/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */
|
|
|
|
#ifndef SE_INCL_NETWORKPROFILE_H
|
|
#define SE_INCL_NETWORKPROFILE_H
|
|
#ifdef PRAGMA_ONCE
|
|
#pragma once
|
|
#endif
|
|
|
|
#ifndef __ENGINE_BASE_PROFILING_H__
|
|
#include <Engine/Base/Profiling.h>
|
|
#endif
|
|
|
|
/* Class for holding profiling information for network. */
|
|
class CNetworkProfile : public CProfileForm {
|
|
public:
|
|
// indices for profiling counters and timers
|
|
enum ProfileTimerIndex {
|
|
PTI_MAINLOOP, // time spent in main game loop
|
|
PTI_TIMERLOOP, // time spent in timer game loop
|
|
|
|
PTI_SERVER_LOOP, // time server spent processing messages
|
|
PTI_SESSIONSTATE_LOOP, // time session state spent processing messages
|
|
PTI_SESSIONSTATE_PROCESSGAMESTREAM, // time session state spent processing gamestream (includes physics)
|
|
|
|
PTI_SENDMESSAGE, // time spend sending message
|
|
PTI_RECEIVEMESSAGE, // time spend receiving message
|
|
PTI_COUNT
|
|
};
|
|
enum ProfileCounterIndex {
|
|
PCI_GAMESTREAMRESENDS, // how many times gamestream block was resent from server
|
|
|
|
PCI_GAMESTREAM_BYTES_SENT, // bytes sent in gamestream messages
|
|
PCI_GAMESTREAM_BYTES_RECEIVED, // bytes received in gamestream messages
|
|
PCI_ACTION_BYTES_SENT, // bytes sent in action messages
|
|
PCI_ACTION_BYTES_RECEIVED, // bytes received in action messages
|
|
|
|
PCI_MESSAGESSENT, // total number of messages sent
|
|
PCI_MESSAGESRECEIVED, // total number of messages received
|
|
PCI_BYTESSENT, // total number of bytes sent
|
|
PCI_BYTESRECEIVED, // total number of bytes received
|
|
PCI_COUNT
|
|
};
|
|
// constructor
|
|
CNetworkProfile(void);
|
|
};
|
|
|
|
#endif // include-once blocker.
|
|
|
|
|