Brad Nicholes wrote:
>>>> On 12/5/2007 at 11:33 AM, in message
> <[EMAIL PROTECTED]>, Paul Millar
> <[EMAIL PROTECTED]> wrote:
>> On Thursday 29 November 2007 00:09:20 Brad Nicholes wrote:
>> [...]
>>>> <METRIC NAME="swap_free" VAL="1999988" TYPE="uint32" UNITS="KB"
>>>> TN="81296" TMAX="180" DMAX="0" SLOPE="both" SOURCE="gmond">
>>>> <EXTRA_DATA DESC="Amount of available swap memory"/>
>>>> <EXTRA_DATA TITLE="swap_free"/>
>>> By default the <EXTRA_DATA TITLE> is the same as the metric name.  However
>>> if you add a Title="blah" to any Metric{} block in gmond.conf file, that
>>> title is reflected in the <EXTRA_DATA TITLE> tag.
>> Why not simply omit the <EXTRA_DATA_TITLE> if the user doesn't supply it?
>>
>> If, under these circumstances, it's always going to be the metric name, why 
>> not have gmetad infer this.  Not including redundant information may save (a 
>>
>> bit) on transfer time.
>>
> 
> We could.  I just thought that it might be easier for the web frontend if it 
> didn't have to worry about whether the TITLE existed or not and could just 
> count on it being there.  I am guessing that moving forward an alternate user 
> friendly title will probably be the norm rather than the exception.  At the 
> moment since the code is in kind of a transition state is seems more like the 
> exception.
> 
> Brad

I'd prefer to see more distinctive tag names, and less done with attributes.

<METRIC>
   <DESC>Amount of available swap memory</DESC>
   <TITLE>swap_free</TITLE>
</METRIC>

is preferable to

<METRIC>
   <EXTRA_DATA DESC="Amount of available swap memory" />
   <EXTRA_DATA TITLE="swap_free" />
</METRIC>

in my opinion.  It's just a personal preference, though, and I think as 
a consumer (from the web frontend) I could work with either.

Here's a few reasons I prefer the second scheme:
*  It uses a tag name that more closely describes the data it's 
containing.  True, it is 'extra data', but it's more specifically a 
'title' or a 'description' of the metric.
* It allows further nesting of tags, if such a thing becomes desirable.
* It gives you more options for validation, since 'desc' and 'title' and 
other items may have different ranges of valid values, data types, etc. 
  If they're all 'extra data', you can't validate it much at all.

I know that attribute vs. tag is a longstanding argument, and it's a 
matter that draws out pretty strong opinions.   Just thought I'd throw 
this out as a possibility.

alex

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to