Ok, I've now refreshed my cvs knowledge.
I've done a : cvs diff GraphVisualizer.java > GraphVisualizer.patch
And so on for the other files.
I really hope this is correct, let me know if not.
The changes are described in a mail I sent last weekend.
A short recap :
- add y axis
- change layout, to make more room for the graph display
Any comments on these changes are appreciated.
Regards
Alf Hogemark
here are the patches :
I just include them as text in this email, instead of as attachements.
Is that the way to do it ?
I'm wondering what happens with spaces / TABs in the source code...
Index: messages.properties
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/org/apache/jmeter/resources/messages.properties,v
retrieving revision 1.45
diff -r1.45 messages.properties
99a100,103
> graph_results_no_samples=No of Samples
> graph_results_ms=ms
> graph_results_latest_sample=Latest Sample
> graph_choose_graphs=Graphs to Display
Index: messages_no.properties
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/org/apache/jmeter/resources/messages_no.properties,v
retrieving revision 1.1
diff -r1.1 messages_no.properties
86a87,90
> graph_results_no_samples=Antall sampel
> graph_results_ms=ms
> graph_results_latest_sample=Siste sampel
> graph_choose_graphs=Vis grafer
Index: GraphVisualizer.java
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/org/apache/jmeter/visualizers/GraphVisualizer.java,v
retrieving revision 1.17
diff -r1.17 GraphVisualizer.java
91a92,94
> private JTextField maxYField = null;
> private JTextField minYField = null;
> private JTextField noSamplesField = null;
111a115
> noSamplesField.setText(Long.toString(model.getSampleCount()));
114a119
> updateYAxis();
118a124,125
> // We have received one more sample
> noSamplesField.setText(Long.toString(model.getSampleCount()));
121a129,138
> updateYAxis();
> }
>
> /**
> * Update the max and min value of the Y axis
> */
> private void updateYAxis()
> {
> maxYField.setText(Long.toString(model.getMax()));
> minYField.setText("0");
145a163,166
> // Set up panel where user can choose which graphs to display
> JPanel chooseGraphsPanel = new JPanel();
> chooseGraphsPanel.setLayout(new FlowLayout());
> JLabel selectGraphsLabel = new
>JLabel(JMeterUtils.getResString("graph_choose_graphs"));
159,163c180,183
< JPanel checkPanel = new JPanel();
< checkPanel.setLayout(new GridLayout(0, 1));
< checkPanel.add(data);
< checkPanel.add(average);
< checkPanel.add(deviation);
---
> chooseGraphsPanel.add(selectGraphsLabel);
> chooseGraphsPanel.add(data);
> chooseGraphsPanel.add(average);
> chooseGraphsPanel.add(deviation);
164a185
> // Set up the graph itself
166d186
<
172c192,221
<
---
>
>
> // Set up Y axis panel
> JPanel graphYAxisPanel = new JPanel();
> graphYAxisPanel.setLayout(new BorderLayout());
> JPanel maxYPanel = new JPanel(new FlowLayout());
> JLabel maxYLabel = new JLabel(JMeterUtils.getResString("graph_results_ms"));
> maxYField = new JTextField(8);
> maxYField.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
> maxYField.setEditable(false);
> maxYField.setForeground(Color.black);
> maxYField.setBackground(getBackground());
> maxYPanel.add(maxYField);
> maxYPanel.add(maxYLabel);
> JPanel minYPanel = new JPanel(new FlowLayout());
> JLabel minYLabel = new JLabel(JMeterUtils.getResString("graph_results_ms"));
> minYField = new JTextField(8);
> minYField.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
> minYField.setEditable(false);
> minYField.setForeground(Color.black);
> minYField.setBackground(getBackground());
> minYPanel.add(minYField);
> minYPanel.add(minYLabel);
> graphYAxisPanel.add(maxYPanel, BorderLayout.NORTH);
> graphYAxisPanel.add(minYPanel, BorderLayout.SOUTH);
>
> // Set up footer of graph which displays numerics of the graphs
> JPanel dataPanel = new JPanel();
> JLabel dataLabel = new
>JLabel(JMeterUtils.getResString("graph_results_latest_sample"));
> dataLabel.setForeground(Color.black);
173a223
> dataField.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
176a227,231
> dataPanel.add(dataLabel);
> dataPanel.add(dataField);
> JPanel averagePanel = new JPanel();
> JLabel averageLabel = new
>JLabel(JMeterUtils.getResString("graph_results_average"));
> averageLabel.setForeground(Color.blue);
177a233
> averageField.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
180a237,241
> averagePanel.add(averageLabel);
> averagePanel.add(averageField);
> JPanel deviationPanel = new JPanel();
> JLabel deviationLabel = new
>JLabel(JMeterUtils.getResString("graph_results_deviation"));
> deviationLabel.setForeground(Color.red);
181a243
> deviationField.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
184a247,274
> deviationPanel.add(deviationLabel);
> deviationPanel.add(deviationField);
> JPanel noSamplesPanel = new JPanel();
> JLabel noSamplesLabel = new
>JLabel(JMeterUtils.getResString("graph_results_no_samples"));
> noSamplesField = new JTextField(10);
> noSamplesField.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
> noSamplesField.setEditable(false);
> noSamplesField.setForeground(Color.black);
> noSamplesField.setBackground(getBackground());
> noSamplesPanel.add(noSamplesLabel);
> noSamplesPanel.add(noSamplesField);
>
> JPanel graphInfoPanel = new JPanel();
> graphInfoPanel.setLayout(new FlowLayout());
> graphInfoPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
>
> graphInfoPanel.add(noSamplesPanel);
> graphInfoPanel.add(dataPanel);
> graphInfoPanel.add(averagePanel);
> graphInfoPanel.add(deviationPanel);
>
> // Set up the graph with header, footer, Y axis and graph display
> JPanel graphPanel = new JPanel();
> graphPanel.setLayout(new BorderLayout());
> graphPanel.add(graphYAxisPanel, BorderLayout.WEST);
> graphPanel.add(chooseGraphsPanel, BorderLayout.NORTH);
> graphPanel.add(graphScrollPanel, BorderLayout.CENTER);
> graphPanel.add(graphInfoPanel, BorderLayout.SOUTH);
186,192c276
< JPanel showPanel = new JPanel();
< showPanel.setLayout(new GridLayout(0, 1));
< showPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
< showPanel.add(dataField);
< showPanel.add(averageField);
< showPanel.add(deviationField);
<
---
> // Add the main panel and the graph
194,196c278
< this.add(checkPanel, BorderLayout.WEST);
< this.add(graphScrollPanel, BorderLayout.CENTER);
< this.add(showPanel, BorderLayout.EAST);
---
> this.add(graphPanel, BorderLayout.CENTER);
245c327
<
---
> updateYAxis();
256c338
< return "Show the samples analysys as dot plots";
---
> return "Show the samples analysis as dot plots";
258,261d339
<
<
<
<