[standards-jig] JEP-0039 (Statistics Gathering): The argument for <item/>

Matthew A. Miller linuxwolf at outer-planes.no-ip.COM
Sat Nov 9 19:54:41 UTC 2002


The latest version of JEP-0039 removed the <item/> element, presumably
because lists (of JIDs) are redundant.  And this is true, since disco
and browse handle this just fine...for JIDs.  But then how could I use
disco or browse to present my GPS "statistics", or the throughput (by
session) from a JOBS server?

The use of <item/> lists in stats would allow for a lot of flexibility,
without necessarily increasing the complexity that much.  Also, this
most likely reduces the amount of record-keeping JANA is responsible
for, since "nested" stats wouldn't need to register each little piece.

To follow are some (presumably) useful stats, and how they'd look using
<item/>.  I'll leave representing them using the JEP's current spec as
an "exercise for the reader" (-:

================

EXAMPLE:  It was brought up that it might be very desirable to get a
count of the categories of packets that are sent/received.  In that
example, a lot of "overloading" of the <stat/>'s name attribute was
used.  I would argue that this is more cleanly handled with <item/>:

<stat name='jabber/packets' units='packets'>
  <item name='in' units='bytes'>12301571714</item>
  <item name='out' units='bytes'>12341097132</item>
  <item name='iq/in'>405624</item>
  <item name='iq/out'>435123</item>
  ...
</stat>

EXAMPLE:  One of the examples that had been in JEP-0039 was reporting
GPS coordinates.  Without <item/>, this gets cumbersome.  With <item/>,
it's more encapsulated:
<stat name='x-app/gps' units='decimal-degrees'>
  <item name='latitude'>N49.25903</item>
  <item name='longitude'>W122.77428</item>
</stat>

EXAMPLE: In JOBS, it might be a really good idea to get the throughput
rates for various sessions.  Including <item/> can facilitate this:
<stat name='jobs/throughput' units='bytes/sec'>
  <item name='session:01234567'>1024</item>
  <item name='session:01234213'>550624</item>
  ...
</stat> 

================

-- 
Matt "linuxwolf" Miller
E-MAIL: linuxwolf at outer-planes.net
JID:    linuxwolf at outer-planes.net

- Get JABBER! (http://www.jabber.org/)




More information about the Standards mailing list