Baselines

A baseline is a logical name that can be attached to a certain state of a branch of your project. Normally, the state of your project is identified by the timestamp of the run that computed the project state. A baseline is a convenient way to refer to such a state by name instead of a date. A baseline is usually used to mark a milestone in your development process.

A baseline has the following properties:

Branch
A baseline is always created in the context of a branch (of a project).
Name
The name of the baseline. This name should be unique for the branch.
Date
The date that the baseline is associated with. This date always coincides with an analysis date, or 'run'.
Plotline
Whether the baseline should be rendered as a plot-line in the trend diagram. This is usually useful, but it can clutter the view if you have many baselines. If you create a baseline for each run for instance, it can be useful to only show plot-lines for the milestones.
Delta (advanced)
Whether the baseline should be used as an implicit delta reference date. When you select a delta metric, you can specify the date with which you want to compare against, called the 'delta reference date'. As long as you do not explicitly select a date, the date for last baseline that has this option set will be used implicitly.

Baseline names are rendered as vertical plot-lines in the trend diagram, if configured as such by the plotline property. In any case, the baseline name is always shown in the tooltip when you hover over the associated date.

Baselines are visible in the trend diagrams as vertical red plot-lines (if Plotline property is set), and in the tooltip

Baseline names also appear in certain menus and dialogs in the viewer as convenient shortcuts. For instance, the Time Machine filter in the breadcrumb lists baselines, as well as the Date Picker dialog that is shown when you change the reference date for a Delta metric.

Baseline used as (implicit) delta reference date

Setting baselines using the viewer

Baselines can be created, changed, or deleted via the 'Manage Baselines' dialog. This dialog can be opened by clicking in one of the following locations:

To create, edit, or delete baselines you need to have the proper permission (manageBaselines), otherwise the context menu items will not be visible. Permission can be set in the Administration Pages.

Setting baselines from the command line

In addition to setting baselines via the UI, they can also be set via the TICS command-line tools.

You can set a baseline on an existing run from the command line by using TICSMaintenance (documentation):

TICSMaintenance -setbaseline BASELINE_NAME,plotline:1 -timestamp ISO_DATE

It is also possible to set a baseline for the run that will be created by a TICSQServer analysis (documentation):

TICSQServer -setbaseline BASELINE_NAME,plotline:1

Advanced: Run Merging using Baselines

An advanced use case of baselines allows you to merge multiple runs into one. If you associate multiple consecutive runs with the same baseline, those runs will appear as one in the viewer. This makes it possible to schedule metric calculation over multiple points in time, while still making it appear as a single logical run in the viewer.

Limitation: You can only use the command line to use this advanced feature.

For example, separate the metric calculation into three phases:

  1. All TQI metrics except Abstract Interpretation and Code Coverage:
    TICSQServer -setbaseline MyBaseline -calc ALL -nocalc ABSTRACTINTERPRETATION,UNITTESTCOVERAGE ...
    
  2. Abstract Interpretation
    TICSQServer -setbaseline MyBaseline -calc ABSTRACTINTERPRETATION ...
    
  3. Code Coverage
    TICSQServer -setbaseline MyBaseline -calc UNITTESTCOVERAGE ...
    

By giving these consecutive runs the same baseline, the viewer will show a single measurement point (with the date of the first of these runs).