time based networking profiling lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- cpicanco · 2021-05-22 17:15 Hi everyone, What are you using for time based networking profiling? I am searching for options for profiling a zmq program. Best, R ---------------------------------------------------------------------- MarkMLl · 2021-05-22 20:28 Since nobody else has chipped in: what exactly are you asking here? Are you asking about measuring network latency or response, or are you asking about measuring the internal performance of a program which happens to be networked? Out of interest, what underlying protocol does zmq use- UDP, TCP, or does it sit directly on top of IP? MarkMLl ---------------------------------------------------------------------- cpicanco · 2021-05-22 22:30 Quote from: MarkMLl on May 22, 2021, 10:28:39 pmAre you asking about measuring network latency or response, or are you asking about measuring the internal performance of a program which happens to be networked? I want to make a measurement using both Network Time (latency) and CPU time (processing time) to make a good picture of the performance of the program. Quote from: MarkMLl on May 22, 2021, 10:28:39 pmOut of interest, what underlying protocol does zmq use- UDP, TCP, or does it sit directly on top of IP? From the site (https://zeromq.org/ at the present day): "ZeroMQ (also known as ØMQ, 0MQ, or zmq) looks like an embeddable networking library but acts like a concurrency framework. It gives you sockets that carry atomic messages across various transports like in- process, inter-process, TCP, and multicast. You can connect sockets N-to-N with patterns like fan-out, pub-sub, task distribution, and request-reply. It's fast enough to be the fabric for clustered products. Its asynchronous I/O model gives you scalable multicore applications, built as asynchronous message-processing tasks. It has a score of language APIs and runs on most operating systems." As you can see, ZMQ has the concept of "transport" for different protocols. It has its own abstract protocols too, for instance. The specific program (https://github.com/cpicanco/fpc-zmq- example/blob/master/not_in_zmq_guide/simple_chat.pas) uses TCP as the underlying "transport" for exchanging messages between two (or more) local endpoints. ---------------------------------------------------------------------- MarkMLl · 2021-05-23 07:41 Quote from: cpicanco on May 23, 2021, 12:30:19 amI want to make a measurement using both Network Time (latency) and CPU time (processing time) to make a good picture of the performance of the program. To get the CPU time you'll probably need a platform-specific library or out-of-program facility. That will probably give you a decent clock by which you can time network performance, but failing that I believe EpikTimer is well-regarded although I usually go direct to the kernel using Linux to get times to better than mSec resolution. MarkMLl ---------------------------------------------------------------------- cpicanco · 2021-05-23 16:08 Quote from: MarkMLl on May 23, 2021, 09:41:44 amQuote from: cpicanco on May 23, 2021, 12:30:19 amI want to make a measurement using both Network Time (latency) and CPU time (processing time) to make a good picture of the performance of the program. To get the CPU time you'll probably need a platform-specific library or out-of-program facility. That will probably give you a decent clock by which you can time network performance, but failing that I believe EpikTimer is well-regarded although I usually go direct to the kernel using Linux to get times to better than mSec resolution. MarkMLl At first I was using "clock_gettime()" on linux, than I needed to do some stuff on Windows and found EpikTimer (that uses "clock_gettime() too on linux). It is just great. When you said "I usually go direct to the kernel using Linux", do you mean getting access to clock_gettime()? ---------------------------------------------------------------------- MarkMLl · 2021-05-23 21:17 Quote from: cpicanco on May 23, 2021, 06:08:40 pmWhen you said "I usually go direct to the kernel using Linux", do you mean getting access to clock_gettime()? No. MarkMLl