On Fri, Mar 16, 2012 at 4:14 AM, sebb <[email protected]> wrote:
> On 16 March 2012 06:26, Blaine Morgan <[email protected]> wrote:
> > I am new to this list, and I am building a stats plugin that will expose
> > the it's per-sampler (group by SampleLabel) stats via JMX. I have it
> > working as a Visualizer derived from(StatVisualizer), so you can see the
> > stats in a table as well as retrieve them from JMX. But alas this does
> not
> > work in headless mode. So, need to add a ResultColletor. This results
> in
> > the following question:
> >
> > Can a class derived from AbstractVisualizer that creates a TestElement
> > derived from ResultCollector (that is building statistics) be notified
> when
> > the ResultCollector updates the stats?
> >
> > Or do I need to clone the stats engine in both classes and do double the
> > work as each will have to process add(SampleResult res) or
> > sampleOccurred(SampleEvent se) respectively.
>
> Note that JMeter deliberately does not create visualisers when running
> in non-GUI mode.
> Visualisers should only be used for display purposes.
>
> Have a look at ResultSaver.java
>
Yes, I have figured that much out. I want to calculate the stats
regardless of GUI/non-GUI and expose them via JMX. If I have the add the
following to my visualizer:
@Override
public TestElement createTestElement() {
TestElement te = new StatIIJmxReporter();
this.
modifyTestElement(te);
//te.setComment(JMeterPluginsUtils.getWikiLinkText(WIKIPAGE));
te.setComment("Wiki Page goes here");
return te;
}
The StatIIJmxReporter runs in GUI or non-GUI. I would like to visualize
the same stats in a table but only in gui mode. Right now it looks as if I
would have to do the calculations twice: once for the reporter and once for
the visualizer. This "feels" wrong to me.
Blaine