Having just finished 0.40, which implemented Comparable to make sorting easier, I went through more of the code - including the demos included, and those in SolView - to look at how they sorted (or, in some cases, failed to sort where they should have) their output. This led me to make a slight change to the jkstat api, which cleaned up a little of the code.
The data stored by a Kstat is a simple key-value hash.The original implementation exposed this internal data structure - you simply got access to the internal Java
Map. This always felt slightly ugly, exposing internal implementation details. So that's been changed. There's a new
Kstat.statistics()method, which simply returns a
Setof the statistic names. This is really what clients want, rather than getting the hash and getting its keys, which is what they did before. Furthermore, in almost every case you want the list of statistic names to be sorted, so rather than everyone getting the list and sorting it themselves, it's backed by a
TreeSetand is already sorted. The original
getMap()method is gone. Removed. That's why we're not yet at version 1.
This version also includes a couple of samples using JStripChart, as shown in an earlier blog entry