[lttng-dev] String format based events

Jeffrey Chen cpthk at hotmail.com
Wed Jun 17 19:51:06 EDT 2015


I have a question while reading the lttng documentation. Could anyone answer me? Thanks a lot.

It looks like lttng events are all key-value pairs. Like { my_val1 = 10, my_val2 = "OK" }. Does lttng supports regular string format based events, like Windows ETW. I want a human readable sentences in the event like "My CPU usage is 50 , my memory usage is 100". Of course, I know I could manually construct the string myself and pass the result in one string down to lttng. But, the idea is that, string format is slow. So, Windows ETW does the string formatting only when you read the logs.
For example, if I want to write many "My CPU usage is {0} , my memory usage is {1}" to log. Windows ETW does not write this whole string to log. It only writes the 2 variable values of this trace to the log, and construct back the original string when you are reading the logs.

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20150617/550bee35/attachment.html>


More information about the lttng-dev mailing list