dCache/dcache — pull request #907 by alrossi (2014-10-13 13:49:17+00:00)
Title: (2.6) webadmin: minor improvements to rrd4j-based pool-queue plots

There seems to be a bug in the rrd4j code. I have
reported this but am not confident anything will be done about it, since
version 2.2 came out in June of 2013 and no activity is evident
since then. In reality, the bug has already been discovered,
but the original reporter did not follow up by providing
a concrete case or data for verification. This is what I provided.

https://code.google.com/p/rrd4j/issues/detail?id=44

In essence, it seems that the stacked graphs are subject to
ghost artifacts which create a different colored border around
the area; if the time steps are narrow enough, this actually
can look as though it were displaying non-zero values for
a different data set. See the attached for comparison of
24, 48 and 96-hour graphs of the same data.

In the course of investigating this problem, I did discover
that the code was allowing unfeasible mappings of minimum
timesteps to fractions of a pixel. This has now been fixed
by automatically adjusting the width; the code also forces
at least two pixels per timestep (cfr. the 96-hour graph)
by expanding the width. This at least guarantees a certain
amount of legibility and mitigates the border-bug.

A number of other minor improvements and adjustments were
made:

- The histogram has been slightly rewritten for efficiency;
- An interface has been added to facilitate (1).
- Use of the source name derived from the enum has been regularized.
- "!" has been appended to this name, to enforce, according to rrd4j
convention, the conversion of NaNs to 0.0s.
- The separate refresh interval has been eliminated. The sampling should
be congruent with the minimum time step.
- Local variables have been added for re-used values.
- The plot display names were being set to ALL CAPS for aesthetics/readability;
this has been removed to favor easy cut & paste into the filter
from other sources such as the logs or directory listings.
- Default values for time span have been changed to something more reasonable
(48 hours rather than two weeks).

Target: 2.6
Acked-by: Karsten
Require-book: no
Require-notes: yes
Committed: d05087656c66d036914c033b601d04cc1fdb5882

NOTE: The refresh property need not be removed in the backports (it will
just be ingored by the code).

Testing: Redeployed and observed plotting behavior (see attached) on testbed.

RELEASE NOTES:

Small adjustments to the pool queue plots in order to improve
appearance. Some property defaults have been changed. Note:
this patch does not entirely remedy what appears to be a bug
in rrd4j (see https://code.google.com/p/rrd4j/issues/detail?id=44).