org.apache.jmeter.visualizers

Class MonitorGraph

Implemented Interfaces:
Clearable, MonitorGuiListener

public class MonitorGraph
extends JComponent
implements MonitorGuiListener, Clearable

MonitorGraph will draw the performance history of a given server. It displays 4 lines:

Constructor Summary

MonitorGraph()
Deprecated. Only for use in unit testing
MonitorGraph(MonitorAccumModel model)

Method Summary

void
clearData()
clear will repaint the graph
void
paintComponent(Graphics g)
painComponent is responsible for drawing the actual graph.
void
setHealth(boolean health)
void
setLoad(boolean load)
void
setMem(boolean mem)
void
setThread(boolean thread)
void
updateGui()
updateGui() will call repaint
void
updateGui(MonitorModel model)
The method will first check to see if the graph is visible.

Constructor Details

MonitorGraph

public MonitorGraph()

Deprecated. Only for use in unit testing

Needed for Serialization tests.

MonitorGraph

public MonitorGraph(MonitorAccumModel model)

Method Details

clearData

public void clearData()
clear will repaint the graph
Specified by:
clearData in interface Clearable

paintComponent

public void paintComponent(Graphics g)
painComponent is responsible for drawing the actual graph. This is because of how screen works. Tried to use clipping, but I don't understand it well enough to get the desired effect.

setHealth

public void setHealth(boolean health)

setLoad

public void setLoad(boolean load)

setMem

public void setMem(boolean mem)

setThread

public void setThread(boolean thread)

updateGui

public void updateGui()
updateGui() will call repaint
Specified by:
updateGui in interface MonitorGuiListener

updateGui

public void updateGui(MonitorModel model)
The method will first check to see if the graph is visible. If it is, it will repaint the graph.
Specified by:
updateGui in interface MonitorGuiListener

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.