Documentation‎ > ‎

TimeToPic help



Basics

Filtering data

Sometimes there is too much data on screen and you are interested only in a limited set of data. Filtering will help you remove all uninteresting data. You can use two different filters: Activity and Keyword filters.

Filter by activity

Press "F" key to filter current view. Channels that does not have changes will be filtered out. Toggle filter off by pressing "F" again.


Filter by keywords

Type keywords to to bottom left edit box. All channels that contains one of those keywords will be shown. 
In example below, user wanted to show channels that contains paint or draw! indicates negation that could be used filtering some channels out.


Math operations

TimeToPic suppors certain calculations for channels. In future there will be more available. Today they are:

Count

Counts item counts of timeline. Press "i" key on channel for count.  "+" & "-" keys can be used for zooming channel. 


Frequency

Calculates how many items there are happening on second. For example screen paint is happening every 20ms. This will be mean 1/0.020sec = 50Hz.

Calculation applies to all channels and are activated by pressing "y" key.


Rate

ValueABS data element is used for showing numerical data on timeline. Lets assume that your application data points value is 10 and their frequency is 10 Hz. Rate here will mean 10 Hz * 10 = 100.

Calculation applies only channels containing numerical values (valueABS type)  and are activated by pressing "u" key.

Examples of valueABS (numerical value) channels:

  • Screen paint time data. 
  • Datapoints and rate calculation (would not make sense in this context) 
  • Datapoints and frequency calculation. Here this makes sense since paint events are reported once when paint starts. 

Notes on calculation algoritms

  • Screen will be divided to 32 slots and math are performed to those slots. If there are not enough data points, zero will be displayed.
  • Data is scaled 0-100. Zero value will be Global minimum of channel or local minimum (visible area minimum). Legends are adjusted accordingly. Same applies to maximum. 
  • When zooming or unzooming, channel max value may jump to level that does not exists. To reset labels, just toggle calculation on-off-on. 
  • Some calculations make not sense depending tha context. If your value items are indicating time, rate calculation does not tell anything. For example, if you value items are "data rateof something", rate calculation will result "transfer speed".

Sorting data

One of basic functionalities is data sorting. You need to sort visible data on more than occasions and here are the basic sorting types.

Sort - By occurence

Sort events by occurence. Move cursor to desired time and press "e" key. This sorts channels by their occurence time: selected channel goes to bottom and next channels stack over it by their occurence. 

Sort - By duration 

Press "x" key and then data is sorted so that items taking most time current visible screen are sorted from bottom to up. 


Sort - By occurence count 

Press "s" key and then data is sorted so that items having most activity (start edges) current visible screen are sorted from bottom to up. 


Sort - By name 

Press "w" key and then data is sorted by channel name. 

Reordering data

Sometimes it is good idea adjust channel orders and size by hand. 

Use mouse to move

At channel pane (left side of application), press mouse key down and drag channel to desired position.



Use '+' to resize active channel

It will easier to see numerical data when channel size is bigger. Use '+' to adjust channel height.

TimeToPic stores channel specific settings and those are automatically loaded when you open a new log.

Limitations of TimeToPic 

TimeToPic is meant for serious software development so you need to know possible caveats of current version of this tool.

Log data order

To maximize log loading speed TimeToPic assumes that log data is ordered by from start to end (chronological order). This also means that start time < finish time.

Timestamp resolution

For example if your log timestamp resolution is milliseconds and log item actually starts 1.0003 s and finish 1.0004 s… you log will show 1.000 s and 1.000 s meaning that event duration is 0 seconds. TimeToPic will show that there is something around 1.000 s but you cannot zoom because zoom would be infinity. 

Engineering is mastering trade offs. Learn what you have to and do perfection!

Advanded topics

Log browser

Log browser is a great feature when log file has both TimeToPic traces and plain text debug traces.

Tip! Add plain text data to your traces right after TimeToPic-traces. You'll have loads of extra information relating to visual elements that you can access right from the UI.

How to use

TimeToPic can show log file contents from cursor position giving you power to visualize your traces and read debug texts at the same time! Open log browser with "l"


Logbrowser window when it has been enabled. Here there are visible log items that are not supported by TimeToPic. 



When user points some event on time line, TimeToPic will show text log nearby that location. --> See big picture using timeline and then details (your custom log lines) from log browser window.

Start TimeToPic using commandline

Here are listed commandline options supported by TimeToPic. 

Start specified file when starting TimeToPic

TimeToPic.exe infile=<filename>
TimeToPic.exe infile="C:\Users\Erkki\Documents\Testdata\PianoMIDIlog.txt"

Will start TimeToPic and open specified file

Generate picture from log using timetopic (chain tool to part of automatic analysis systems)

TimeToPic.exe infile="C:\MyLogs\Testidataa\PianoMIDIlog.txt" outpicfile="c:\temp\myPic.png" exitoncecompleted=yes startsec=1 endsec=2

Will start TimeToPic and 

  1. Open "PianoMIDIIlog.txt". infile="C:\MyLogs\Testidataa\PianoMIDIlog.txt"
  2. Scroll and log between 1-2 seconds. startsec=1 endsec=2
  3. Write picturefile to c:\temp\mypic.png. outpicfile="c:\temp\myPic.png"
  4. exit application after completion. exitoncecompleted=yes
infile="C:\MyLogs\Testidataa\PianoMIDIlog.txt" outpicfile="c:\temp\myPic.png" exitoncecompleted=no secsfromend=10 

Will ..
  1. Open log.
  2. Zoom between end-10 and end.  where "end" is log finish time.
  3. Write picture.
  4. Does not close application. >> You can start analysis from this prepared position

Histograms

Histograms can be used for checking typical durations and intervals of items at desired range.  One good use would be such as"What is typical execution time of my algoritm and what is the worst case in my current use case?"

Duration histograms for events

Duration is calculated from item lenght measured in time: Tduration = Tfinish - Tstart.

You can use interval analysis for example:

  1. Is my application processing this data at fixed rate?
  2. Are there variation between frame rate of my video decoder?

Steps to do historgram

1. Select desired range where histogram is calculated by zooming.


2. Press "z" key and histogram is calculated. 
3. If histogram height is too small, use "+" key to resize channel. 

When moving mouse top of histogram you will see category name and and it is value and it proportion of all value from range.

Interval histograms for events 

Interval is calculated from 2 items start times:  Tinterval = T2start - T1start.
Do similar way like duration histogram, but use "a" key instead.

You can use interval analysis for example:

  1. Is my application processing this data at fixed rate?
  2. Are there variation between frame rate of my video decoder?

Value historgram for valueABS

When applying histogram for valueabs channel, histogram is always calculated from values. --> No interval or duration histograms for valueabs type channels.

Notes

  1. You can have 3 histogram active same time. Pressing 4th time histogram keys, all histograms will vanish.
  2. Black line top of historgram indicates cumulative % of values. When reaching top it means that 100% values occured previous categories of histogram.

Similar items

Similar items feature can be used form measuring lifetimes, propagation delays.  Some good uses would be such as "I have allocated memory. When it is released?" or "System sends message from A. How long it takes reach B?"

Theory

Named event has comments.  In log below snippet below you can see comments bolded.

6.1414;namedevent;start;Mem-Alloc;611427720
6.1414;namedevent;stop;Mem-Alloc
6.14145;namedevent;start;Mem-Alloc;611428056
6.14146;namedevent;stop;Mem-Alloc
6.14149;namedevent;start;Mem-Alloc;611428392
6.1415;namedevent;stop;Mem-Alloc
6.14153;namedevent;start;Mem-Alloc;611428728
6.14153;namedevent;stop;Mem-Alloc
6.14157;namedevent;start;Mem-Alloc;611429064

Example from old R&D version of TimeToPic

With good text editor you can perform search like below (Notepad++ used here):
Same can be done with TimeToPic using visual view:

>> You can see same visually that help you understanding what is happening between those interesting points.

Steps to use similar events

1. Make user that you log has named events. This works, if there at 2 least named event with similar comment. See following example:

6.1414;namedevent;start;Mem-Alloc;611427720
6.1414;namedevent;stop;Mem-Alloc

6.58602;namedevent;start;Mem-Use;611427720
6.58603;namedevent;stop;Mem-Use

7.49914;namedevent;start;Mem-Free;611427720
7.49916;namedevent;stop;Mem-Free

There are 3 events that are logically connected via reference 611427720

2. Move mouse cursor to top of named event. 
3. Press "n". Tool should now draw connecting lines between those items. 
4. Press "b" will remove lines. Also pressing histogram keys 4th time, will remove lines.

Notes

  1. Named event requires closing event to work  ( "..;namedevent;stop;Mem-Alloc")

Special tutorials

Timestamp offsetting

In some special cases, you might have concatenated 2 or more logs into same file. If second log timestamps are not fully sync with first one, you might want adjust some channels time positions manually. This can be done using key “.” that starts channel time stamp offsetting procedure. 

Move mouse to top channel. Press “.”. Move channel time offset by moving mouse. Press “.” again. Now channel have been offsetted. There is indicator on channels on left of view. 

If you want remove offsetting. Start procedure  and stop it without moving mouse in between. Offsetting is removed. 

Comments