How to format profiling time stamp messagesCarsten Driesner and Andre Fischer, last change on August 2nd, 2001 IntroductionEach use of the macros The next section describes the overall format of the time stamps written by the macros. The format of the text passed as arguments to the macros is described int the third section. Overall time stamp format
Each time stamp written by one of the macros
%d %d %c %s : %s with the following arguments:
Note that the dividing colon between the last two fields is written even if one of them remains empty. As you can see, you can only specify the content of the last two fields. The format that they may have is described in the following section. Admissable format of scope names and messagesThis section focuses on the format of the last two fields of a time stamp. The first one should have format %s (%s) %s with the following arguments:
The three fields are separated by singles spaces. The second argument may have any format you like with two constraints:
Use RTL_LOGFILE_CONTEXT_AUTHOR<n> if possible to automatically write the fields described above with every time stamp emitted from the context. If that is not possible or usefull then start the message field with a string that has the format described above. Use your common sense to fill in the second and fourth field. Divide that string with a colon surrounded by spaces from the actual message string. ExamplesThe following pseudo code uses a context to write time stamps at the beginning and end of scopes in the implicit form and the explicit one that uses the message string to indicate the scope boundaries. void ::Desktop::OpenStartupscreen (arguments) { RTL_LOGFILE_CONTEXT_AUTHOR (aInstance, desktop, cd100003, ::Desktop::OpenStartupscreen); ... RTL_LOGFILE_CONTEXT_TRACE (aInstance, { lengthy calculation); for (...) { do something } RTL_LOGFILE_CONTEXT_TRACE (aInstance, } lengthy calculation);
It generate time stamps like these: 001234 11 { desktop (cd100003) ::Desktop::OpenStartupscreen 002345 11 | desktop (cd100003) ::Desktop::OpenStartupscreen : { lengthy calculation 003456 11 | desktop (cd100003) ::Desktop::OpenStartupscreen : } lengthy calculation 004567 11 } desktop (cd100003) ::Desktop::OpenStartupscreen
This pseudo code uses the context free version: void ::Desktop::CloseStartupscreen { ... RTL_LOGFILE_TRACE_AUTHOR (desktop, cd100003, ::Desktop::CloseStartupscreen : Startup finished); } It's output might look like this: 099999 11 | desktop (cd100003) ::Desktop::CloseStartupscreen : Startup finished
|

