Changeset 32924 in vbox for trunk/src/VBox
- Timestamp:
- Oct 5, 2010 2:20:35 PM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_net.h
r32909 r32924 168 168 int total_bytes_recv; 169 169 int recv_count; 170 int opcodes_count; 170 171 171 172 /* credits for flow control */ -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_clear.c
r32911 r32924 32 32 uint64_t mCallsSum; 33 33 uint32_t *mpaCalls; 34 35 uint64_t mOpsSum; 36 uint32_t *mpaOps; 37 34 38 } VBOXCRFPS, *PVBOXCRFPS; 35 39 … … 42 46 pFps->mpaBytesSent = crCalloc(sizeof (pFps->mpaBytesSent[0]) * cPeriods); 43 47 pFps->mpaCalls = crCalloc(sizeof (pFps->mpaCalls[0]) * cPeriods); 48 pFps->mpaOps = crCalloc(sizeof (pFps->mpaOps[0]) * cPeriods); 44 49 } 45 50 … … 54 59 { 55 60 uint64_t cur = RTTimeNanoTS(); 56 uint64_t curBytes, curBytesSent, curCalls ;61 uint64_t curBytes, curBytesSent, curCalls, curOps; 57 62 int i; 58 63 … … 60 65 curBytesSent = 0; 61 66 curCalls = 0; 67 curOps = 0; 62 68 63 69 for (i = 0; i < cr_server.numClients; i++) … … 68 74 curBytesSent += cr_server.clients[i]->conn->total_bytes_sent; 69 75 curCalls += cr_server.clients[i]->conn->recv_count; 76 curOps += cr_server.clients[i]->conn->opcodes_count; 70 77 cr_server.clients[i]->conn->total_bytes_recv = 0; 71 78 cr_server.clients[i]->conn->total_bytes_sent = 0; 72 79 cr_server.clients[i]->conn->recv_count = 0; 80 cr_server.clients[i]->conn->opcodes_count = 0; 73 81 } 74 82 } … … 90 98 pFps->mpaCalls[pFps->miPeriod] = curCalls; 91 99 100 pFps->mOpsSum += curOps - pFps->mpaOps[pFps->miPeriod]; 101 pFps->mpaOps[pFps->miPeriod] = curOps; 102 92 103 ++pFps->miPeriod; 93 104 pFps->miPeriod %= pFps->mcPeriods; … … 120 131 { 121 132 return vboxCrFpsGetFps(pFps) * pFps->mCallsSum / pFps->mcPeriods; 133 } 134 135 double vboxCrFpsGetOps(PVBOXCRFPS pFps) 136 { 137 return vboxCrFpsGetFps(pFps) * pFps->mOpsSum / pFps->mcPeriods; 122 138 } 123 139 … … 181 197 double bpsSent = vboxCrFpsGetBpsSent(&Fps); 182 198 double cps = vboxCrFpsGetCps(&Fps); 183 crDebug("fps: %f, rec Mbps: %.1f, send Mbps: %.1f, cps: %.1f", fps, bps/(1024.0*1024.0), bpsSent/(1024.0*1024.0), cps); 199 double ops = vboxCrFpsGetOps(&Fps); 200 crDebug("fps: %f, rec Mbps: %.1f, send Mbps: %.1f, cps: %.1f, ops: %.0f", fps, bps/(1024.0*1024.0), bpsSent/(1024.0*1024.0), cps, ops); 184 201 } 185 202 #endif -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_stream.c
r25155 r32924 330 330 msg_opcodes = (const CRMessageOpcodes *) msg; 331 331 opcodeBytes = (msg_opcodes->numOpcodes + 3) & ~0x03; 332 333 #ifdef VBOXCR_LOGFPS 334 CRASSERT(cr_server.curClient && cr_server.curClient->conn && cr_server.curClient->conn->id == msg->header.conn_id); 335 cr_server.curClient->conn->opcodes_count += msg_opcodes->numOpcodes; 336 #endif 332 337 333 338 data_ptr = (const char *) msg_opcodes + sizeof(CRMessageOpcodes) + opcodeBytes;
Note:
See TracChangeset
for help on using the changeset viewer.