Update of /cvsroot/jrobin/src/org/jrobin/demo
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13322/org/jrobin/demo
Modified Files:
PlottableDemo.java StressTest.java
Log Message:
Minor changes to demos...
Index: StressTest.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/demo/StressTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** StressTest.java 8 Nov 2004 11:18:49 -0000 1.3
--- StressTest.java 9 Nov 2004 11:40:50 -0000 1.4
***************
*** 124,128 ****
// GRAPH
printLapTime("Creating composite graph definition");
! RrdGraphDef gdef = new RrdGraphDef(TIME_START, 0); // A 0 end time makes sure the last sample time i used
gdef.setTitle("Temperatures");
gdef.setVerticalLabel("Fahrenheits");
--- 124,128 ----
// GRAPH
printLapTime("Creating composite graph definition");
! RrdGraphDef gdef = new RrdGraphDef(TIME_START, 0); // A 0 end time makes sure the last sample time i used
gdef.setTitle("Temperatures");
gdef.setVerticalLabel("Fahrenheits");
Index: PlottableDemo.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/demo/PlottableDemo.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PlottableDemo.java 28 Oct 2004 20:04:42 -0000 1.4
--- PlottableDemo.java 9 Nov 2004 11:40:50 -0000 1.5
***************
*** 38,45 ****
class PlottableDemo {
static final double[] SF_DOWNLOAD_COUNT = {
! 0, 0, 13, 34, 76, 72, 255, 144, 135, 194, 358, 304, 293
};
static final double[] SF_PAGE_HITS = {
! 0, 1072, 517, 979, 2132, 2532, 5515, 3519, 3500, 4942, 7858, 7797, 6570
};
static final GregorianCalendar[] SF_TIMESTAMPS =
--- 38,45 ----
class PlottableDemo {
static final double[] SF_DOWNLOAD_COUNT = {
! 0, 0, 13, 34, 76, 72, 255, 144, 135, 194, 358, 304, 293, 293, 289, 530, 252, 251
};
static final double[] SF_PAGE_HITS = {
! 0, 1072, 517, 979, 2132, 2532, 5515, 3519, 3500, 4942, 7858, 7797, 6570, 8415, 8368, 12353, 12711, 11008
};
static final GregorianCalendar[] SF_TIMESTAMPS =
***************
*** 174,178 ****
LinearInterpolator downloadsInterpolator =
new LinearInterpolator(SF_TIMESTAMPS, SF_DOWNLOAD_COUNT);
! RrdGraphDef gDef = new RrdGraphDef(SF_TIMESTAMPS[0],
SF_TIMESTAMPS[SF_TIMESTAMPS.length - 1]);
gDef.setTitle("JRobin statistics at SourceForge");
--- 174,181 ----
LinearInterpolator downloadsInterpolator =
new LinearInterpolator(SF_TIMESTAMPS, SF_DOWNLOAD_COUNT);
! LinearInterpolator trendInterpolator =
! new LinearInterpolator(SF_TIMESTAMPS, SF_PAGE_HITS);
! trendInterpolator.setInterpolationMethod(LinearInterpolator.INTERPOLATE_REGRESSION);
! RrdGraphDef gDef = new RrdGraphDef(SF_TIMESTAMPS[0],
SF_TIMESTAMPS[SF_TIMESTAMPS.length - 1]);
gDef.setTitle("JRobin statistics at SourceForge");
***************
*** 181,188 ****
gDef.datasource("hits", hitsInterpolator);
gDef.datasource("downloads", downloadsInterpolator);
gDef.datasource("ratio", "downloads,0,EQ,UNKN,hits,downloads,/,IF");
gDef.area("hits", Color.GREEN, null);
gDef.line("hits", Color.RED, "page hits", 2);
! gDef.area("downloads", Color.MAGENTA, "downloads@L");
gDef.vrule(new GregorianCalendar(2004, 0, 1), Color.BLUE, null, 3);
gDef.setTimeAxis(TimeAxisUnit.MONTH, 1, TimeAxisUnit.MONTH, 1, "MMM", false);
--- 184,193 ----
gDef.datasource("hits", hitsInterpolator);
gDef.datasource("downloads", downloadsInterpolator);
+ gDef.datasource("trend", trendInterpolator);
gDef.datasource("ratio", "downloads,0,EQ,UNKN,hits,downloads,/,IF");
gDef.area("hits", Color.GREEN, null);
gDef.line("hits", Color.RED, "page hits", 2);
! gDef.area("downloads", Color.MAGENTA, "downloads");
! gDef.line("trend", Color.ORANGE, "trend@L");
gDef.vrule(new GregorianCalendar(2004, 0, 1), Color.BLUE, null, 3);
gDef.setTimeAxis(TimeAxisUnit.MONTH, 1, TimeAxisUnit.MONTH, 1, "MMM", false);
|