简体   繁体   中英

How to measure speed of an execution via IPC of two applications

  1. I have a sending application that sends a command via an anonymous pipe.
  2. I have a receiving application that receives the command, handles it, and returns a result.
  3. The sending application receives the result.

I can time the length of the complete operation in the first application (steps 1-3). I can also time the handling of the second application that executes the command (step 2).

Looking at both logs I can subtract the time for step 2 form the time of step 1-3 and assuming that the sending application doesn't waste any time, I now know how many time for the transfer was used. Is there any way, that I can sync both logs in some way, that both logs show the same time-token in msecs. Or to sync all operations in some way, that I can see all timing in the log of the first application.

I know that the applications need some special commands to sync them in some way. But this would be possible, but I have no clue if this is possible at all.

Or the question in other words: Is it possible to time everything in application 1 without looking on both logs individually.

Best possible result:

  1. I know the time that is used for the i/o (pipe)
  2. Time of code executed in app 2 (without i/o)
  3. Time of code executed in app 1 (without i/o)

Further information: The applications run on different machines. Even in different networks connected via VPN.

Similar to what Joseph Larson suggested, but without concern of clocks to be synchronized: could you just append a time spent in app 2 to the result it returns? Then log it from app 1 , together with total time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM