The Secret Diary of Han, Aged 0x29

twitter.com/h4n

Decent defaults in graphs

Graphs now have decent defaults for legends and y-axis label. The GraphCreator generates these defaults if, and only if, the legend and yLabel values are not present in the GraphDefinition. This means that a user can always override default values in the graph URL (or the graphDefinition), by just specifying value for the ylabel and leg<plotno> attributes.

The ylabel default is created as follows:
The streams in the graph are scanned for yTitle, yUnit and yQuantity. These are specified in the stream’s measurement type. The format of the yLabel is then

yTitle | yQuantity "(" yUnit ")"

. A common yTitle is preferred over a common yQuantity if both are found. If no common yTitle or YQuantity are found, only the yUnit is displayed. If no common yUnit is found, it is skipped too

The legends are created using this recipe:
The streams of a plot are scanned for MeasurementType, yQuantiy, address, component class and component instance. Only common attributes are displayed in the legend in the following format:

address class instance - measurementType.Description | measurementType.Name | yQuantity.

Additionally, if there are multiple streams in the plot, the legend is prepended with Operation ” of (” streams.Count “)”

The plot type gets a default of LINE2. It is possible to specify a plot type for all plots (using type=LINE1) or specify different types for different plots (using type1=LINE1&type2=LINE3, etc).

Finally, the consolidation operation for a plot, which is either Sum or Average, gets a default value based on the new isRatio attribute of a measurement type. Ratio’s (e.g. % CPU Usage) are averaged, whereas non-ratio’s (like request/sec) are summed by default.

Advertisements

Written by Han

June 11, 2003 at 18:15

Posted in Uncategorized

%d bloggers like this: