Classifying dates and times for data analysis


All days and hours are not equivalent in data analysis. For example, the system utilization is generally lower at night, during weekends and holidays.  

While performing an analysis, you may apply a filter so that only data from a given class is taken into account.

Tip

A day (hour) class is a label that classifies each day (hour) as a member of a homogeneous group of days (hours).

For example, a day class may be Working Day, ranging from Monday to Friday of each week. Another day class may be a Holiday, including December 25th. An example of hour classes could be: Day Hours, from 9 am to 7 pm, and Night Hours, from 0 am to 9 am and from 7 pm to 12 pm.

All the definitions of hour and day classes are contained in the BMC TrueSight Capacity Optimization Calendar. As some definitions might overlap, a concept of priority is present: each day or hour class is given a fixed priority number; when two definitions overlap, the class with the lower priority value takes precedence and assigns its label.

All the definitions of hour and day classes are contained in the Calendar. To use this feature, navigate to Administration > Data Warehouse > Calendar.

The following figure shows three day class definitions with the corresponding descriptions and colors in the calendar.

Classes1.png

Adding a day class

Note

Only TrueSight Capacity Optimization administrators can modify the calendar. Beware that adding a day class impacts the data collection and classification activities. A new day class might also increase the BMC TrueSight Capacity Optimization database size and load. Moreover, it is impossible to delete a class. Therefore, you should only add a new class if it is necessary.

Each day class is composed of three parts:

  • The definition: You assign the class name, description, and color used to mark its days when you create it
  • The rules: You set the rules used to assign days to this class through the Add a definition form located at the bottom of the Calendar page
  • The definitions: You define the time at which hour classes start and stop, i.e. the hours that constitute a day of this class, in the day class detail page

To create a day class, click the Add class button in the Day classes table and fill in the form specifying the class name, description, and color. Click Save to confirm; you will be taken to the class detail page.

Day class definition

Each day class must have some rules defining how to match the days that belong to it. Rules are characterized by the following five filters:

  • Year
  • Month
  • Day
  • Weekday (1=Sunday, 2=Monday, ..., 7=Saturday)
  • Month week (1-5 where week 1 starts on the first day of the month and ends on the seventh) when used in conjunction with the weekday filter allows specifying rules like "third friday of the month"

You can either set a specific value for each of these properties or set an asterisk (*) as a wildcard, meaning that every value of that property is valid for that class. Leaving the field empty is the same as using an asterisk (*).

While adding the day class definition, make sure that you add the exact value and do not use zero before the value. For example, do not use '02' to denote the second week or month. 

Using zero in value might show unexpected results in Administration > Data Warehouse > Calendar.


In the following example, setting a definition as shown in the code block means that this class includes the second Tuesday of February of every year.

Example
year = *, month = 2, day = *, week day = 3, month week = 2

By adding rules to the definition, you can tailor the day class to your specific needs.

The following figure displays an example of a day class definition:

Sundays are classified as holidays (HOL), Saturdays are represented using a different class (SAT), and all other days that are not assigned any rule implicitly use the default working day (WKD).
classes2.png

After a new day class has been created, you have to assign it a priority so that classification conflicts can be resolved. To do this, click the Change order button and move the classes in the order you prefer. Classes displayed at the top of the list take precedence over those at the bottom.

After specifying the days a day class is made of, you should configure its hour classes.

Hour classes

The Add a definition form in a day class detail page lets you select an existing hour class and match it to a time range. Hours must be specified in the HH:MM format.

If the available hour classes are not enough, you can add new ones. To do so, click on the Add class button in the Hour classes table and choose a name, description and color. When done, click Save.

The following figures show an example of hours definition for the day class WD. All day classes share the same hour class tags.

Hour classes tags
Hour classes.png

Hour classes definition
Hour classes definitions.png

Hour class browser

Hour class browser.png

Calendar browser

The Calendar browser helps you recognize the various day classes in the selected month. To change the displayed month, use the drop-down selection and then click Apply. The Calendar is used to filter all collected data and, during an analysis, you can choose to exclude points belonging to specific classes.

Calendar browser
classes3.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*