- I have a sending application that sends a command via an anonymous pipe.
- I have a receiving application that receives the command, handles it, and returns a result.
- 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:
- I know the time that is used for the i/o (pipe)
- Time of code executed in app 2 (without i/o)
- 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 theresult
it returns? Then log it fromapp 1
, together with total time.