performance

S

Shuo

hi all!

i´ve written a programm to swap sum files from a tcp/ip connection.now i
havte to optimize the performance. but first i want to do some load tests.
how can i log the process informations like the task manager? i want to
see the tcp/ip connection, the processor efficiency. i dont want to
profile functions.
how can i do that?

thanks

best regards

shuo yang
 
D

David

hi all!

i´ve written a programm to swap sum files from a tcp/ip connection. now i
havte to optimize the performance. but first i want to do some load tests.
how can i log the process informations like the task manager? i want to
see the tcp/ip connection, the processor efficiency. i dont want to
profile functions.
how can i do that?

thanks

best regards

shuo yang

You will need to consult your operating system's APIs to gather system
specific information such as that.

The Microsoft Task Manager doesn't usually give you much infomation
that would be useful in a first order analysis, especially without a
much deeper context of what was running on the machine.

I'd start by minimizing the test-to-test differences, such as what
the operating system and other tasks might be doing. Then construct
a large test and time it. time() is standard under C/C++. CTime()
can get much better resolution under Windows. Count the data or
transactions or whatever you want to measure and then do the math
and spit it out after the test.

Optimizing the underlying efficiency of TCP/IP and other APIs
that you depend on should be quite easy to guess. If it isn't part
of your code it probably takes a long time, relatively speaking.
So reading a TCP Stream byte by byte would likely be inefficient
because the many calls required to get a given unit of data would
be much larger than just asking for the unit of data. TCP doesn't
gaurantee large transfers to there is a bit of work to optimize
the solution. Generally if your application has nothing useful to
do, go to sleep and let the rest of the machine do what it wants.

As for optimizing after the fact, this could be easy or difficult
depending on how you wrote the initial application to start with.

Good luck,

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,183
Messages
2,570,967
Members
47,517
Latest member
Andres38A1

Latest Threads

Top