You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2014/07/10 03:34:00 UTC

[1/2] git commit: Updated the queries and benchmark test to make them more consistent and easier to use.

Repository: incubator-vxquery
Updated Branches:
  refs/heads/prestonc/benchmark_updates d7772ec41 -> 1b7d3aafe


Updated the queries and benchmark test to make them more consistent and easier to use.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/5f72282e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/5f72282e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/5f72282e

Branch: refs/heads/prestonc/benchmark_updates
Commit: 5f72282e2548cc91d0bf24a6e4276272f150344c
Parents: d7772ec
Author: Preston Carman <pr...@apache.org>
Authored: Wed Jul 9 18:26:30 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Wed Jul 9 18:26:30 2014 -0700

----------------------------------------------------------------------
 .../noaa-ghcn-daily/other_systems/mrql/q00.mrql |  7 -----
 .../noaa-ghcn-daily/other_systems/mrql/q01.mrql |  5 ----
 .../noaa-ghcn-daily/other_systems/mrql/q02.mrql |  8 ------
 .../noaa-ghcn-daily/other_systems/mrql/q03.mrql |  6 ----
 .../noaa-ghcn-daily/other_systems/mrql/q04.mrql |  8 ------
 .../other_systems/mrql/q04_sensor.mrql          |  5 ----
 .../other_systems/mrql/q04_station.mrql         |  8 ------
 .../noaa-ghcn-daily/other_systems/mrql/q05.mrql | 11 --------
 .../other_systems/mrql/q05_sensor.mrql          |  7 -----
 .../other_systems/mrql/q05_station.mrql         |  7 -----
 .../noaa-ghcn-daily/other_systems/mrql/q06.mrql | 12 --------
 .../other_systems/mrql/q06_sensor.mrql          |  7 -----
 .../other_systems/mrql/q06_station.mrql         |  7 -----
 .../noaa-ghcn-daily/other_systems/mrql/q07.mrql | 11 --------
 .../other_systems/mrql/q07_join_count.mrql      | 10 -------
 .../other_systems/mrql/q07_tmax.mrql            |  6 ----
 .../other_systems/mrql/q07_tmin.mrql            |  6 ----
 .../other_systems/mrql_gsn/q00.mrql             |  7 +++++
 .../other_systems/mrql_gsn/q01.mrql             |  5 ++++
 .../other_systems/mrql_gsn/q02.mrql             |  8 ++++++
 .../other_systems/mrql_gsn/q03.mrql             |  6 ++++
 .../other_systems/mrql_gsn/q04.mrql             |  8 ++++++
 .../other_systems/mrql_gsn/q04_sensor.mrql      |  5 ++++
 .../other_systems/mrql_gsn/q04_station.mrql     |  8 ++++++
 .../other_systems/mrql_gsn/q05.mrql             | 11 ++++++++
 .../other_systems/mrql_gsn/q05_sensor.mrql      |  7 +++++
 .../other_systems/mrql_gsn/q05_station.mrql     |  7 +++++
 .../other_systems/mrql_gsn/q06.mrql             | 12 ++++++++
 .../other_systems/mrql_gsn/q06_sensor.mrql      |  7 +++++
 .../other_systems/mrql_gsn/q06_station.mrql     |  7 +++++
 .../other_systems/mrql_gsn/q07.mrql             | 10 +++++++
 .../other_systems/mrql_gsn/q07_join_count.mrql  | 10 +++++++
 .../other_systems/mrql_gsn/q07_tmax.mrql        |  6 ++++
 .../other_systems/mrql_gsn/q07_tmin.mrql        |  6 ++++
 .../other_systems/mrql_hcn/q00.mrql             |  7 +++++
 .../other_systems/mrql_hcn/q01.mrql             |  5 ++++
 .../other_systems/mrql_hcn/q02.mrql             |  8 ++++++
 .../other_systems/mrql_hcn/q03.mrql             |  6 ++++
 .../other_systems/mrql_hcn/q04.mrql             |  8 ++++++
 .../other_systems/mrql_hcn/q04_sensor.mrql      |  5 ++++
 .../other_systems/mrql_hcn/q04_station.mrql     |  8 ++++++
 .../other_systems/mrql_hcn/q05.mrql             | 11 ++++++++
 .../other_systems/mrql_hcn/q05_sensor.mrql      |  7 +++++
 .../other_systems/mrql_hcn/q05_station.mrql     |  7 +++++
 .../other_systems/mrql_hcn/q06.mrql             | 12 ++++++++
 .../other_systems/mrql_hcn/q06_sensor.mrql      |  7 +++++
 .../other_systems/mrql_hcn/q06_station.mrql     |  7 +++++
 .../other_systems/mrql_hcn/q07.mrql             | 10 +++++++
 .../other_systems/mrql_hcn/q07_join_count.mrql  | 10 +++++++
 .../other_systems/mrql_hcn/q07_tmax.mrql        |  6 ++++
 .../other_systems/mrql_hcn/q07_tmin.mrql        |  6 ++++
 .../noaa-ghcn-daily/other_systems/saxon/q04.xq  |  8 +++---
 .../noaa-ghcn-daily/other_systems/saxon/q05.xq  |  8 +++---
 .../noaa-ghcn-daily/other_systems/saxon/q06.xq  |  6 ++--
 .../noaa-ghcn-daily/scripts/run_benchmark.sh    | 10 +++++--
 .../scripts/run_benchmark_cluster.sh            | 10 +++++--
 .../noaa-ghcn-daily/scripts/run_group_test.sh   | 17 +++++++++---
 .../noaa-ghcn-daily/scripts/run_mrql_test.sh    | 29 --------------------
 .../noaa-ghcn-daily/scripts/run_mrql_tests.sh   | 15 +++++++---
 .../src/main/resources/util/log_top.sh          |  4 +--
 60 files changed, 313 insertions(+), 185 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q00.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q00.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q00.mrql
deleted file mode 100644
index 538df72..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q00.mrql
+++ /dev/null
@@ -1,7 +0,0 @@
-select (r)
-from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
-where text(r.station) = "GHCND:USW00012836"
-    and toInt(substring(text(r.date), 0, 4)) >= 2003
-    and toInt(substring(text(r.date), 5, 7)) = 12
-    and toInt(substring(text(r.date), 8, 10)) = 25
-;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q01.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q01.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q01.mrql
deleted file mode 100644
index 5e8de9b..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q01.mrql
+++ /dev/null
@@ -1,5 +0,0 @@
-select (r)
-from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
-where text(r.dataType) = "AWND"
-    and toInt(text(r.value)) > 491.744
-;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q02.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q02.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q02.mrql
deleted file mode 100644
index b8cd451..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q02.mrql
+++ /dev/null
@@ -1,8 +0,0 @@
-sum(
-    select (toInt(text(r.value)))
-    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
-    where text(r.station) = "GHCND:USW00014771"
-        and toInt(substring(text(r.date), 0, 4)) = 1999
-        and text(r.dataType) = "PRCP"
-) / 10
-;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q03.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q03.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q03.mrql
deleted file mode 100644
index 981e4c3..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q03.mrql
+++ /dev/null
@@ -1,6 +0,0 @@
-max(
-    select (toInt(text(r.value)))
-    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
-    where text(r.dataType) = "TMAX"
-) / 10
-;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04.mrql
deleted file mode 100644
index 7d11b49..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04.mrql
+++ /dev/null
@@ -1,8 +0,0 @@
-select (r)
-from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
-    t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
-    l in t.locationLabels
-where text(t.id) = text(r.station) 
-    and text(r.date) = "1976-07-04T00:00:00.000"
-    and text(l.displayName) = "WASHINGTON"
-;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_sensor.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_sensor.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_sensor.mrql
deleted file mode 100644
index bf30e52..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_sensor.mrql
+++ /dev/null
@@ -1,5 +0,0 @@
-select (r)
-from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
-where text(r.date) = "1976-07-04T00:00:00.000"
-  and text(r.dataType) = "TMAX"
-;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_station.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_station.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_station.mrql
deleted file mode 100644
index fdd6fba..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q04_station.mrql
+++ /dev/null
@@ -1,8 +0,0 @@
-count(
-    select (r)
-    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
-        t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
-        l in t.locationLabels
-    where text(l.displayName) = "WASHINGTON"
-)
-;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05.mrql
deleted file mode 100644
index 5b940f3..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05.mrql
+++ /dev/null
@@ -1,11 +0,0 @@
-min(
-  select (toInt(text(r.value)))
-  from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
-    t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
-    l in t.locationLabels
-  where text(t.id) = text(r.station) 
-    and toInt(substring(text(r.date), 0, 4)) = 2001
-    and text(r.dataType) = "TMIN"
-    and text(l.id) = "FIPS:US"
-) / 10
-;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_sensor.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_sensor.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_sensor.mrql
deleted file mode 100644
index 232b07b..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_sensor.mrql
+++ /dev/null
@@ -1,7 +0,0 @@
-count(
-    select (toInt(text(r.value)))
-    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
-    where toInt(substring(text(r.date), 0, 4)) = 2001
-      and text(r.dataType) = "TMIN"
-)
-;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_station.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_station.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_station.mrql
deleted file mode 100644
index b47aeef..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q05_station.mrql
+++ /dev/null
@@ -1,7 +0,0 @@
-count(
-    select (t)
-    from t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
-        l in t.locationLabels
-    where text(l.id) = "FIPS:US"
-)
-;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06.mrql
deleted file mode 100644
index f84f803..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06.mrql
+++ /dev/null
@@ -1,12 +0,0 @@
-select (n, d, v)
-from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
-    d in r.date,
-    v in r.value,
-    t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
-    n in t.displayName,
-    l in t.locationLabels
-where text(t.id) = text(r.station) 
-    and toInt(substring(text(d), 0, 4)) = 2000
-    and text(r.dataType) = "TMAX"
-    and text(l.displayName) = "WASHINGTON"
-;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_sensor.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_sensor.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_sensor.mrql
deleted file mode 100644
index 5050654..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_sensor.mrql
+++ /dev/null
@@ -1,7 +0,0 @@
-count(
-    select (r.date, r.value)
-    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
-    where toInt(substring(text(r.date), 0, 4)) = 2000
-        and text(r.dataType) = "TMAX"
-)
-;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_station.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_station.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_station.mrql
deleted file mode 100644
index 78e3297..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q06_station.mrql
+++ /dev/null
@@ -1,7 +0,0 @@
-count(
-    select (t.displayName)
-    from t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
-        l in t.locationLabels
-    where text(l.displayName) = "WASHINGTON"
-)
-;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07.mrql
deleted file mode 100644
index 40662dd..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07.mrql
+++ /dev/null
@@ -1,11 +0,0 @@
-avg(
-    select (toInt(text(rtmax.value))-toInt(text(rtmin.value)))
-    from rtmax in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
-        rtmin in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
-    where text(rtmax.date) = text(rtmin.date)
-        and text(rtmax.station) = text(rtmin.station)
-        and text(rtmax.dataType) = "TMAX"
-        and text(rtmin.dataType) = "TMIN"
-) / 10
-;
-    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_join_count.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_join_count.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_join_count.mrql
deleted file mode 100644
index 2f41db1..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_join_count.mrql
+++ /dev/null
@@ -1,10 +0,0 @@
-count(
-    select (toInt(text(rtmax.value))-toInt(text(rtmin.value)))
-    from rtmax in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
-        rtmin in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
-    where text(rtmax.date) = text(rtmin.date)
-        and text(rtmax.station) = text(rtmin.station)
-        and text(r.dataType) = "TMAX"
-        and text(r.dataType) = "TMIN"
-)
-;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmax.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmax.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmax.mrql
deleted file mode 100644
index 3db5107..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmax.mrql
+++ /dev/null
@@ -1,6 +0,0 @@
-count(
-    select (rtmax)
-    from rtmax in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
-    where text(r.dataType) = "TMAX"
-)
-;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmin.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmin.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmin.mrql
deleted file mode 100644
index 9c93116..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q07_tmin.mrql
+++ /dev/null
@@ -1,6 +0,0 @@
-count(
-    select (rtmin)
-    from rtmin in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
-    where text(r.dataType) = "TMIN"
-)
-;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q00.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q00.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q00.mrql
new file mode 100644
index 0000000..538df72
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q00.mrql
@@ -0,0 +1,7 @@
+select (r)
+from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+where text(r.station) = "GHCND:USW00012836"
+    and toInt(substring(text(r.date), 0, 4)) >= 2003
+    and toInt(substring(text(r.date), 5, 7)) = 12
+    and toInt(substring(text(r.date), 8, 10)) = 25
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q01.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q01.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q01.mrql
new file mode 100644
index 0000000..5e8de9b
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q01.mrql
@@ -0,0 +1,5 @@
+select (r)
+from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+where text(r.dataType) = "AWND"
+    and toInt(text(r.value)) > 491.744
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q02.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q02.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q02.mrql
new file mode 100644
index 0000000..b8cd451
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q02.mrql
@@ -0,0 +1,8 @@
+sum(
+    select (toInt(text(r.value)))
+    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(r.station) = "GHCND:USW00014771"
+        and toInt(substring(text(r.date), 0, 4)) = 1999
+        and text(r.dataType) = "PRCP"
+) / 10
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q03.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q03.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q03.mrql
new file mode 100644
index 0000000..981e4c3
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q03.mrql
@@ -0,0 +1,6 @@
+max(
+    select (toInt(text(r.value)))
+    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(r.dataType) = "TMAX"
+) / 10
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04.mrql
new file mode 100644
index 0000000..938f6d8
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04.mrql
@@ -0,0 +1,8 @@
+select (r)
+from sensors in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+    stations in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+    l in stations.locationLabels
+where text(stations.id) = text(sensors.station) 
+    and text(sensors.date) = "1976-07-04T00:00:00.000"
+    and text(l.displayName) = "WASHINGTON"
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04_sensor.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04_sensor.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04_sensor.mrql
new file mode 100644
index 0000000..bf30e52
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04_sensor.mrql
@@ -0,0 +1,5 @@
+select (r)
+from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+where text(r.date) = "1976-07-04T00:00:00.000"
+  and text(r.dataType) = "TMAX"
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04_station.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04_station.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04_station.mrql
new file mode 100644
index 0000000..fdd6fba
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q04_station.mrql
@@ -0,0 +1,8 @@
+count(
+    select (r)
+    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+        t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+        l in t.locationLabels
+    where text(l.displayName) = "WASHINGTON"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05.mrql
new file mode 100644
index 0000000..be9edf0
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05.mrql
@@ -0,0 +1,11 @@
+min(
+    select (toInt(text(sensors.value)))
+    from sensors in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+        stations in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+        l in stations.locationLabels
+    where text(stations.id) = text(sensors.station) 
+        and toInt(substring(text(sensors.date), 0, 4)) = 2001
+        and text(sensors.dataType) = "TMIN"
+        and text(l.id) = "FIPS:US"
+) / 10
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05_sensor.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05_sensor.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05_sensor.mrql
new file mode 100644
index 0000000..f0c1490
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05_sensor.mrql
@@ -0,0 +1,7 @@
+count(
+    select (toInt(text(r.value)))
+    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where toInt(substring(text(r.date), 0, 4)) = 2001
+        and text(r.dataType) = "TMIN"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05_station.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05_station.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05_station.mrql
new file mode 100644
index 0000000..b47aeef
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q05_station.mrql
@@ -0,0 +1,7 @@
+count(
+    select (t)
+    from t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+        l in t.locationLabels
+    where text(l.id) = "FIPS:US"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06.mrql
new file mode 100644
index 0000000..c4ab3da
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06.mrql
@@ -0,0 +1,12 @@
+select (n, d, v)
+from sensors in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+    d in sensors.date,
+    v in sensors.value,
+    stations in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+    n in stations.displayName,
+    l in stations.locationLabels
+where text(stations.id) = text(sensors.station) 
+    and toInt(substring(text(d), 0, 4)) = 2000
+    and text(sensors.dataType) = "TMAX"
+    and text(l.displayName) = "WASHINGTON"
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06_sensor.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06_sensor.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06_sensor.mrql
new file mode 100644
index 0000000..5050654
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06_sensor.mrql
@@ -0,0 +1,7 @@
+count(
+    select (r.date, r.value)
+    from r in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where toInt(substring(text(r.date), 0, 4)) = 2000
+        and text(r.dataType) = "TMAX"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06_station.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06_station.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06_station.mrql
new file mode 100644
index 0000000..78e3297
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q06_station.mrql
@@ -0,0 +1,7 @@
+count(
+    select (t.displayName)
+    from t in source(xml, "sample_xml/gsn_stations.xml", {"station"}),
+        l in t.locationLabels
+    where text(l.displayName) = "WASHINGTON"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07.mrql
new file mode 100644
index 0000000..51efa5d
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07.mrql
@@ -0,0 +1,10 @@
+avg(
+    select (toInt(text(rtmax.value))-toInt(text(rtmin.value)))
+    from rtmax in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+        rtmin in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(rtmax.date) = text(rtmin.date)
+        and text(rtmax.station) = text(rtmin.station)
+        and text(rtmax.dataType) = "TMAX"
+        and text(rtmin.dataType) = "TMIN"
+) / 10
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_join_count.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_join_count.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_join_count.mrql
new file mode 100644
index 0000000..2f41db1
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_join_count.mrql
@@ -0,0 +1,10 @@
+count(
+    select (toInt(text(rtmax.value))-toInt(text(rtmin.value)))
+    from rtmax in source(xml, "sample_xml/gsn_sensors.xml", {"data"}),
+        rtmin in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(rtmax.date) = text(rtmin.date)
+        and text(rtmax.station) = text(rtmin.station)
+        and text(r.dataType) = "TMAX"
+        and text(r.dataType) = "TMIN"
+)
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_tmax.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_tmax.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_tmax.mrql
new file mode 100644
index 0000000..3db5107
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_tmax.mrql
@@ -0,0 +1,6 @@
+count(
+    select (rtmax)
+    from rtmax in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(r.dataType) = "TMAX"
+)
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_tmin.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_tmin.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_tmin.mrql
new file mode 100644
index 0000000..9c93116
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_gsn/q07_tmin.mrql
@@ -0,0 +1,6 @@
+count(
+    select (rtmin)
+    from rtmin in source(xml, "sample_xml/gsn_sensors.xml", {"data"})
+    where text(r.dataType) = "TMIN"
+)
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q00.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q00.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q00.mrql
new file mode 100644
index 0000000..0c1e727
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q00.mrql
@@ -0,0 +1,7 @@
+select (r)
+from r in source(xml, "sample_xml/hcn_sensors.xml", {"data"})
+where text(r.station) = "GHCND:USW00012836"
+    and toInt(substring(text(r.date), 0, 4)) >= 2003
+    and toInt(substring(text(r.date), 5, 7)) = 12
+    and toInt(substring(text(r.date), 8, 10)) = 25
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q01.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q01.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q01.mrql
new file mode 100644
index 0000000..4bfa786
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q01.mrql
@@ -0,0 +1,5 @@
+select (r)
+from r in source(xml, "sample_xml/hcn_sensors.xml", {"data"})
+where text(r.dataType) = "AWND"
+    and toInt(text(r.value)) > 491.744
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q02.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q02.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q02.mrql
new file mode 100644
index 0000000..3a9d142
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q02.mrql
@@ -0,0 +1,8 @@
+sum(
+    select (toInt(text(r.value)))
+    from r in source(xml, "sample_xml/hcn_sensors.xml", {"data"})
+    where text(r.station) = "GHCND:USW00014771"
+        and toInt(substring(text(r.date), 0, 4)) = 1999
+        and text(r.dataType) = "PRCP"
+) / 10
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q03.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q03.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q03.mrql
new file mode 100644
index 0000000..3fcee93
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q03.mrql
@@ -0,0 +1,6 @@
+max(
+    select (toInt(text(r.value)))
+    from r in source(xml, "sample_xml/hcn_sensors.xml", {"data"})
+    where text(r.dataType) = "TMAX"
+) / 10
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04.mrql
new file mode 100644
index 0000000..1d9ada6
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04.mrql
@@ -0,0 +1,8 @@
+select (r)
+from r in source(xml, "sample_xml/hcn_sensors.xml", {"data"}),
+    t in source(xml, "sample_xml/hcn_stations.xml", {"station"}),
+    l in t.locationLabels
+where text(t.id) = text(r.station) 
+    and text(r.date) = "1976-07-04T00:00:00.000"
+    and text(l.displayName) = "WASHINGTON"
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04_sensor.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04_sensor.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04_sensor.mrql
new file mode 100644
index 0000000..2823a3f
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04_sensor.mrql
@@ -0,0 +1,5 @@
+select (r)
+from r in source(xml, "sample_xml/hcn_sensors.xml", {"data"})
+where text(r.date) = "1976-07-04T00:00:00.000"
+  and text(r.dataType) = "TMAX"
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04_station.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04_station.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04_station.mrql
new file mode 100644
index 0000000..d362ca8
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q04_station.mrql
@@ -0,0 +1,8 @@
+count(
+    select (r)
+    from r in source(xml, "sample_xml/hcn_sensors.xml", {"data"}),
+        t in source(xml, "sample_xml/hcn_stations.xml", {"station"}),
+        l in t.locationLabels
+    where text(l.displayName) = "WASHINGTON"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05.mrql
new file mode 100644
index 0000000..15c2ef2
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05.mrql
@@ -0,0 +1,11 @@
+min(
+  select (toInt(text(r.value)))
+  from r in source(xml, "sample_xml/hcn_sensors.xml", {"data"}),
+    t in source(xml, "sample_xml/hcn_stations.xml", {"station"}),
+    l in t.locationLabels
+  where text(t.id) = text(r.station) 
+    and toInt(substring(text(r.date), 0, 4)) = 2001
+    and text(r.dataType) = "TMIN"
+    and text(l.id) = "FIPS:US"
+) / 10
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05_sensor.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05_sensor.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05_sensor.mrql
new file mode 100644
index 0000000..a4fa55c
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05_sensor.mrql
@@ -0,0 +1,7 @@
+count(
+    select (toInt(text(r.value)))
+    from r in source(xml, "sample_xml/hcn_sensors.xml", {"data"})
+    where toInt(substring(text(r.date), 0, 4)) = 2001
+      and text(r.dataType) = "TMIN"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05_station.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05_station.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05_station.mrql
new file mode 100644
index 0000000..311e742
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q05_station.mrql
@@ -0,0 +1,7 @@
+count(
+    select (t)
+    from t in source(xml, "sample_xml/hcn_stations.xml", {"station"}),
+        l in t.locationLabels
+    where text(l.id) = "FIPS:US"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06.mrql
new file mode 100644
index 0000000..601a72e
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06.mrql
@@ -0,0 +1,12 @@
+select (n, d, v)
+from r in source(xml, "sample_xml/hcn_sensors.xml", {"data"}),
+    d in r.date,
+    v in r.value,
+    t in source(xml, "sample_xml/hcn_stations.xml", {"station"}),
+    n in t.displayName,
+    l in t.locationLabels
+where text(t.id) = text(r.station) 
+    and toInt(substring(text(d), 0, 4)) = 2000
+    and text(r.dataType) = "TMAX"
+    and text(l.displayName) = "WASHINGTON"
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06_sensor.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06_sensor.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06_sensor.mrql
new file mode 100644
index 0000000..5172bc0
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06_sensor.mrql
@@ -0,0 +1,7 @@
+count(
+    select (r.date, r.value)
+    from r in source(xml, "sample_xml/hcn_sensors.xml", {"data"})
+    where toInt(substring(text(r.date), 0, 4)) = 2000
+        and text(r.dataType) = "TMAX"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06_station.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06_station.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06_station.mrql
new file mode 100644
index 0000000..c38bee3
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q06_station.mrql
@@ -0,0 +1,7 @@
+count(
+    select (t.displayName)
+    from t in source(xml, "sample_xml/hcn_stations.xml", {"station"}),
+        l in t.locationLabels
+    where text(l.displayName) = "WASHINGTON"
+)
+;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07.mrql
new file mode 100644
index 0000000..1adf2cc
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07.mrql
@@ -0,0 +1,10 @@
+avg(
+    select (toInt(text(rtmax.value))-toInt(text(rtmin.value)))
+    from rtmax in source(xml, "sample_xml/hcn_sensors.xml", {"data"}),
+        rtmin in source(xml, "sample_xml/hcn_sensors.xml", {"data"})
+    where text(rtmax.date) = text(rtmin.date)
+        and text(rtmax.station) = text(rtmin.station)
+        and text(rtmax.dataType) = "TMAX"
+        and text(rtmin.dataType) = "TMIN"
+) / 10
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_join_count.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_join_count.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_join_count.mrql
new file mode 100644
index 0000000..1630a14
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_join_count.mrql
@@ -0,0 +1,10 @@
+count(
+    select (toInt(text(rtmax.value))-toInt(text(rtmin.value)))
+    from rtmax in source(xml, "sample_xml/hcn_sensors.xml", {"data"}),
+        rtmin in source(xml, "sample_xml/hcn_sensors.xml", {"data"})
+    where text(rtmax.date) = text(rtmin.date)
+        and text(rtmax.station) = text(rtmin.station)
+        and text(r.dataType) = "TMAX"
+        and text(r.dataType) = "TMIN"
+)
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_tmax.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_tmax.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_tmax.mrql
new file mode 100644
index 0000000..ab83041
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_tmax.mrql
@@ -0,0 +1,6 @@
+count(
+    select (rtmax)
+    from rtmax in source(xml, "sample_xml/hcn_sensors.xml", {"data"})
+    where text(r.dataType) = "TMAX"
+)
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_tmin.mrql
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_tmin.mrql b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_tmin.mrql
new file mode 100644
index 0000000..34dc039
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_hcn/q07_tmin.mrql
@@ -0,0 +1,6 @@
+count(
+    select (rtmin)
+    from rtmin in source(xml, "sample_xml/hcn_sensors.xml", {"data"})
+    where text(r.dataType) = "TMIN"
+)
+;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04.xq
index 09752d1..7b761d6 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q04.xq
@@ -1,11 +1,11 @@
 (: XQuery Join Query :)
 (: Find all the weather readings for King county for a specific day    :)
 (: 1976/7/4.                                                                  :)
-let $collection2 := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
-for $r in collection($collection2)/root/dataCollection/data
+let $sensor_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+for $r in collection($sensor_collection)/root/dataCollection/data
 
-let $collection1 := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
-for $s in collection($collection1)/root/stationCollection/station
+let $station_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
+for $s in collection($station_collection)/root/stationCollection/station
 
 where $s/id eq $r/station 
     and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "WASHINGTON"))

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05.xq
index eca1c68..394b011 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q05.xq
@@ -2,11 +2,11 @@
 (: Find the lowest recorded temperature (TMIN) in the state of Oregon for     :)
 (: 2001.                                                                      :)
 fn:min(
-    let $collection2 := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
-    for $r in collection($collection2)/root/dataCollection/data
+    let $sensor_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
+    for $r in collection($sensor_collection)/root/dataCollection/data
         
-    let $collection1 := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
-    for $s in collection($collection1)/root/stationCollection/station
+    let $station_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
+    for $s in collection($station_collection)/root/stationCollection/station
     
     where $s/id eq $r/station
         and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06.xq
index 7be7c69..c643f0c 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/saxon/q06.xq
@@ -1,12 +1,12 @@
 (: XQuery Join Query :)
 (: Find the highest recorded temperature (TMAX) for each station for each     :)
 (: day over the year 2000.                                                    :)
-let $station_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
-for $s in collection($station_collection)/root/stationCollection/station
-
 let $sensor_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/?select=*.xml;recurse=yes"
 for $r in collection($sensor_collection)/root/dataCollection/data
 
+let $station_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/?select=*.xml;recurse=yes"
+for $s in collection($station_collection)/root/stationCollection/station
+
 where $s/id eq $r/station
     and $r/dataType eq "TMAX" 
     and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
index b2b1531..9b79277 100755
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
@@ -27,6 +27,7 @@
 #
 REPEAT=5
 FRAME_SIZE=10000
+BUFFER_SIZE=8192
 
 if [ -z "${1}" ]
 then
@@ -34,7 +35,7 @@ then
     exit
 fi
 
-export JAVA_OPTS="$JAVA_OPTS -server -Xmx8G -XX:+HeapDumpOnOutOfMemoryError -Djava.util.logging.config.file=./vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/benchmark_logging.properties"
+export JAVA_OPTS="$JAVA_OPTS -server -Xmx1G -XX:+HeapDumpOnOutOfMemoryError -Djava.util.logging.config.file=./vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/benchmark_logging.properties"
 
 for j in $(find ${1} -name '*q??.xq')
 do
@@ -45,7 +46,12 @@ do
         log_file="$(basename ${j}).$(date +%Y%m%d%H%M).log"
         log_base_path=$(dirname ${j/queries/query_logs})
         mkdir -p ${log_base_path}
-        time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -showoet -showrp -frame-size ${FRAME_SIZE} -repeatexec ${REPEAT} > ${log_base_path}/${log_file} 2>&1
+time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -showoet -showrp -frame-size ${FRAME_SIZE} -buffer-size ${BUFFER_SIZE} -repeatexec ${REPEAT} > ${log_base_path}/${log_file} 2>&1
     fi;
 done
 
+SUBJECT="Benchmark Tests Finished"
+EMAIL="ecarm002@ucr.edu"
+/bin/mail -s "${SUBJECT}" "${EMAIL}" <<EOM
+Completed all tests in folder ${1}.
+EOM
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh
index f868024..a00de98 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh
@@ -27,6 +27,7 @@
 #
 REPEAT=5
 FRAME_SIZE=10000
+BUFFER_SIZE=8192
 
 if [ -z "${1}" ]
 then
@@ -47,7 +48,7 @@ python vxquery-server/src/main/resources/scripts/cluster_cli.py -c vxquery-serve
 # wait for cluster to finish setting up  
 sleep 5
 
-export JAVA_OPTS="$JAVA_OPTS -server -Xmx8G -XX:+HeapDumpOnOutOfMemoryError -Djava.util.logging.config.file=./vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/benchmark_logging.properties"
+export JAVA_OPTS="$JAVA_OPTS -server -Xmx1G -XX:+HeapDumpOnOutOfMemoryError -Djava.util.logging.config.file=./vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/benchmark_logging.properties"
 
 for j in $(find ${1} -name '*q??.xq')
 do
@@ -62,7 +63,7 @@ do
             log_file="$(basename ${j}).$(date +%Y%m%d%H%M).log"
             log_base_path=$(dirname ${j/queries/query_logs})
             mkdir -p ${log_base_path}
-            time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${3} -timing -showquery -showoet -showrp -frame-size ${FRAME_SIZE} -repeatexec ${REPEAT} > ${log_base_path}/${log_file} 2>&1
+            time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${3} -timing -showquery -showoet -showrp -frame-size ${FRAME_SIZE} -buffer-size ${BUFFER_SIZE} -repeatexec ${REPEAT} > ${log_base_path}/${log_file} 2>&1
         fi;
     fi;
 done
@@ -70,3 +71,8 @@ done
 # Stop cluster.
 python vxquery-server/src/main/resources/scripts/cluster_cli.py -c vxquery-server/src/main/resources/conf/${2}nodes.xml -a stop
 
+SUBJECT="Benchmark Cluster Tests Finished"
+EMAIL="ecarm002@ucr.edu"
+/bin/mail -s "${SUBJECT}" "${EMAIL}" <<EOM
+Completed all tests in folder ${1} for a ${2} node cluster.
+EOM
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_group_test.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_group_test.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_group_test.sh
index b6ff22f..7bef3cb 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_group_test.sh
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_group_test.sh
@@ -17,19 +17,28 @@
 # limitations under the License.
 #
 
+DATASET="dataset-hcn-d2"
 cluster_ip=${1}
 
-for n in 2 1 0
+for n in 4 
 do
-    for t in "batch_scale_out" "speed_up"
+    #for t in "batch_scale_out" "speed_up"
+    for t in "batch_scale_out"
+    #for t in "speed_up"
     do 
-        for p in 2 1
+        for p in 0  
         do 
             for c in 4
             do 
                 echo " ==== node ${n} test ${t} partition ${p} cores ${c} ===="
-                sh noaa-ghcn-daily/scripts/run_benchmark_cluster.sh weather_data/dataset-small-d2/queries/${t}/${n}nodes/d2_p${p}/ ${n} "-client-net-ip-address ${cluster_ip} -available-processors ${c}"
+                sh vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh weather_data/${DATASET}/queries/${t}/${n}nodes/d2_p${p}/ ${n} "-client-net-ip-address ${cluster_ip} -available-processors ${c}"
             done
         done
     done
 done
+
+SUBJECT="Benchmark Group Tests Finished"
+EMAIL="ecarm002@ucr.edu"
+/bin/mail -s "${SUBJECT}" "${EMAIL}" <<EOM
+Completed all tests in the predefined group for ${DATASET}.
+EOM
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_test.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_test.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_test.sh
deleted file mode 100644
index dd25c01..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_test.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#      http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-export JAVA_HOME=/home/ecarm002/java/jdk1.6.0_45
-REPEAT=${1}
-
-#for n in `seq 0 7`
-for n in 6
-do
-	date
-	echo "Running q0${n} for MRQL."
-	time for i in {1..${REPEAT}}; do ~/mrql/incubator-mrql/bin/mrql -dist -nodes 5 ~/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q0${n}.mrql > weather_data/mrql/query_logs/gsn/q0${n}.mrql.log 2>&1; done; 
-done

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_tests.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_tests.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_tests.sh
index dd25c01..eb1b2a2 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_tests.sh
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_tests.sh
@@ -19,11 +19,18 @@
 
 export JAVA_HOME=/home/ecarm002/java/jdk1.6.0_45
 REPEAT=${1}
+DATASET="hcn"
 
-#for n in `seq 0 7`
-for n in 6
+for n in `seq 0 7`
+#for n in 0
 do
 	date
-	echo "Running q0${n} for MRQL."
-	time for i in {1..${REPEAT}}; do ~/mrql/incubator-mrql/bin/mrql -dist -nodes 5 ~/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql/q0${n}.mrql > weather_data/mrql/query_logs/gsn/q0${n}.mrql.log 2>&1; done; 
+	echo "Running q0${n} on ${DATASET} for MRQL."
+	time for i in {1..${REPEAT}}; do ~/mrql/incubator-mrql/bin/mrql -dist -nodes 5 ~/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_${DATASET}/q0${n}.mrql >> weather_data/mrql/query_logs/${DATASET}/q0${n}.mrql.log 2>&1; done; 
 done
+
+SUBJECT="MRQL Tests Finished (${DATASET})"
+EMAIL="ecarm002@ucr.edu"
+/bin/mail -s "${SUBJECT}" "${EMAIL}" <<EOM
+Completed all MRQL tests on ${DATASET}.
+EOM
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5f72282e/vxquery-benchmark/src/main/resources/util/log_top.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/util/log_top.sh b/vxquery-benchmark/src/main/resources/util/log_top.sh
index 6e54b0c..26557f5 100644
--- a/vxquery-benchmark/src/main/resources/util/log_top.sh
+++ b/vxquery-benchmark/src/main/resources/util/log_top.sh
@@ -6,12 +6,12 @@ iostat >> /dev/null
 sar -n DEV 1 1  >> /dev/null
 
 # Save IO, CPU and Network snapshot to a log file.
-while (sleep 10)
+while (sleep 7)
 do
 	echo "---------------------------------------------" >> ${LOG_FILE}
 	date >> ${LOG_FILE}
 	echo >> ${LOG_FILE}
-	iostat >> ${LOG_FILE}
+	iostat -y 1 1 >> ${LOG_FILE}
 	top -n 1 -b | head -11 | tail -6 >> ${LOG_FILE}
 	sar -n DEV 1 1 >> ${LOG_FILE}
 done;
\ No newline at end of file


[2/2] git commit: Added a disk performance test to help identify the disk speed and parsing speed.

Posted by pr...@apache.org.
Added a disk performance test to help identify the disk speed and parsing speed.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/1b7d3aaf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/1b7d3aaf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/1b7d3aaf

Branch: refs/heads/prestonc/benchmark_updates
Commit: 1b7d3aafe23fec163527684ad499e84064263e6f
Parents: 5f72282
Author: Preston Carman <pr...@apache.org>
Authored: Wed Jul 9 18:29:41 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Wed Jul 9 18:29:41 2014 -0700

----------------------------------------------------------------------
 .../noaa-ghcn-daily/scripts/run_benchmark.sh    |  10 +-
 .../scripts/run_benchmark_cluster.sh            |   8 +-
 .../noaa-ghcn-daily/scripts/run_mrql_tests.sh   |   6 +-
 .../java/org/apache/vxquery/cli/VXQuery.java    |   5 +
 .../org/apache/vxquery/xmlparser/XMLParser.java |  18 +-
 vxquery-xtest/pom.xml                           |   4 +
 .../vxquery/xtest/util/DiskPerformance.java     | 214 +++++++++++++++++++
 .../xtest/util/tests/AbstractDiskTest.java      |  78 +++++++
 .../tests/BufferedParsedCharacterStream.java    |  45 ++++
 .../tests/BufferedReaderBufferedStream.java     |  45 ++++
 .../xtest/util/tests/BufferedReaderStream.java  |  43 ++++
 .../xtest/util/tests/BufferedStream.java        |  42 ++++
 .../vxquery/xtest/util/tests/IDiskTest.java     |  15 ++
 .../util/tests/ParsedBufferedByteStream.java    |  48 +++++
 .../tests/ParsedBufferedCharacterStream.java    |  48 +++++
 .../xtest/util/tests/ParsedByteStream.java      |  46 ++++
 .../xtest/util/tests/ParsedCharacterStream.java |  47 ++++
 .../xtest/util/tests/ReaderBufferedStream.java  |  43 ++++
 .../vxquery/xtest/util/tests/ReaderStream.java  |  42 ++++
 .../apache/vxquery/xtest/util/tests/Stream.java |  41 ++++
 20 files changed, 827 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
index 9b79277..ff2d761 100755
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
@@ -27,7 +27,7 @@
 #
 REPEAT=5
 FRAME_SIZE=10000
-BUFFER_SIZE=8192
+BUFFER_SIZE=$((8*1024*1024))
 
 if [ -z "${1}" ]
 then
@@ -35,18 +35,20 @@ then
     exit
 fi
 
-export JAVA_OPTS="$JAVA_OPTS -server -Xmx1G -XX:+HeapDumpOnOutOfMemoryError -Djava.util.logging.config.file=./vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/benchmark_logging.properties"
+export JAVA_OPTS="$JAVA_OPTS -server -Xmx8G -XX:+HeapDumpOnOutOfMemoryError -Djava.util.logging.config.file=./vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/benchmark_logging.properties"
 
 for j in $(find ${1} -name '*q??.xq')
 do
     if [ -z "${3}" ] || [[ "${j}" =~ "${3}" ]] 
     then
-    	date
+        date
         echo "Running query: ${j}"
         log_file="$(basename ${j}).$(date +%Y%m%d%H%M).log"
         log_base_path=$(dirname ${j/queries/query_logs})
         mkdir -p ${log_base_path}
-time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -showoet -showrp -frame-size ${FRAME_SIZE} -buffer-size ${BUFFER_SIZE} -repeatexec ${REPEAT} > ${log_base_path}/${log_file} 2>&1
+        time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -showoet -showrp -frame-size ${FRAME_SIZE} -buffer-size ${BUFFER_SIZE} -repeatexec ${REPEAT} > ${log_base_path}/${log_file} 2>&1
+        echo "Buffer Size: ${BUFFER_SIZE}" >> ${log_base_path}/${log_file}
+        echo "Frame Size: ${FRAME_SIZE}" >> ${log_base_path}/${log_file}
     fi;
 done
 

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh
index a00de98..67b7ca7 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh
@@ -27,7 +27,7 @@
 #
 REPEAT=5
 FRAME_SIZE=10000
-BUFFER_SIZE=8192
+BUFFER_SIZE=1*1024*1024
 
 if [ -z "${1}" ]
 then
@@ -48,7 +48,7 @@ python vxquery-server/src/main/resources/scripts/cluster_cli.py -c vxquery-serve
 # wait for cluster to finish setting up  
 sleep 5
 
-export JAVA_OPTS="$JAVA_OPTS -server -Xmx1G -XX:+HeapDumpOnOutOfMemoryError -Djava.util.logging.config.file=./vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/benchmark_logging.properties"
+export JAVA_OPTS="$JAVA_OPTS -server -Xmx8G -XX:+HeapDumpOnOutOfMemoryError -Djava.util.logging.config.file=./vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/benchmark_logging.properties"
 
 for j in $(find ${1} -name '*q??.xq')
 do
@@ -58,12 +58,14 @@ do
         # Only run for specified queries.
         if [ -z "${4}" ] || [[ "${j}" =~ "${4}" ]]
         then
-        	date
+            date
             echo "Running query: ${j}"
             log_file="$(basename ${j}).$(date +%Y%m%d%H%M).log"
             log_base_path=$(dirname ${j/queries/query_logs})
             mkdir -p ${log_base_path}
             time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${3} -timing -showquery -showoet -showrp -frame-size ${FRAME_SIZE} -buffer-size ${BUFFER_SIZE} -repeatexec ${REPEAT} > ${log_base_path}/${log_file} 2>&1
+            echo "\nBuffer Size: ${BUFFER_SIZE}" >> ${log_base_path}/${log_file}
+            echo "\nFrame Size: ${FRAME_SIZE}" >> ${log_base_path}/${log_file}
         fi;
     fi;
 done

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_tests.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_tests.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_tests.sh
index eb1b2a2..1fa58dd 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_tests.sh
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_mrql_tests.sh
@@ -24,9 +24,9 @@ DATASET="hcn"
 for n in `seq 0 7`
 #for n in 0
 do
-	date
-	echo "Running q0${n} on ${DATASET} for MRQL."
-	time for i in {1..${REPEAT}}; do ~/mrql/incubator-mrql/bin/mrql -dist -nodes 5 ~/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_${DATASET}/q0${n}.mrql >> weather_data/mrql/query_logs/${DATASET}/q0${n}.mrql.log 2>&1; done; 
+    date
+    echo "Running q0${n} on ${DATASET} for MRQL."
+    time for i in {1..${REPEAT}}; do ~/mrql/incubator-mrql/bin/mrql -dist -nodes 5 ~/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/mrql_${DATASET}/q0${n}.mrql >> weather_data/mrql/query_logs/${DATASET}/q0${n}.mrql.log 2>&1; done; 
 done
 
 SUBJECT="MRQL Tests Finished (${DATASET})"

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
----------------------------------------------------------------------
diff --git a/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java b/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
index 02697e9..61226e5 100644
--- a/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
+++ b/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
@@ -148,6 +148,8 @@ public class VXQuery {
      * @throws Exception
      */
     private void execute() throws Exception {
+        System.setProperty("vxquery.buffer_size",Integer.toString(opts.bufferSize));
+        
         if (opts.clientNetIpAddress != null) {
             hcc = new HyracksConnection(opts.clientNetIpAddress, opts.clientNetPort);
             runQueries();
@@ -446,6 +448,9 @@ public class VXQuery {
         @Option(name = "-frame-size", usage = "Frame size in bytes. (default 65536)")
         public int frameSize = 65536;
 
+        @Option(name = "-buffer-size", usage = "Read file buffer size in bytes. (default 512)")
+        public int bufferSize = 512;
+
         @Option(name = "-O", usage = "Optimization Level. Default: Full Optimization")
         private int optimizationLevel = Integer.MAX_VALUE;
 

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/XMLParser.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/XMLParser.java b/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/XMLParser.java
index 0c31d27..1aea1e6 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/XMLParser.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/XMLParser.java
@@ -14,6 +14,7 @@
  */
 package org.apache.vxquery.xmlparser;
 
+import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
@@ -22,7 +23,6 @@ import java.io.InputStreamReader;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.zip.GZIPInputStream;
 
 import org.apache.vxquery.context.StaticContext;
 import org.apache.vxquery.exceptions.VXQueryFileNotFoundException;
@@ -44,6 +44,7 @@ public class XMLParser {
     final SAXContentHandler handler;
     final InputSource in;
     final String nodeId;
+    final int buffer_size;
 
     public XMLParser(boolean attachTypes, ITreeNodeIdProvider idProvider, String nodeId) throws HyracksDataException {
         this(attachTypes, idProvider, nodeId, null, null, null, null);
@@ -52,9 +53,12 @@ public class XMLParser {
     public XMLParser(boolean attachTypes, ITreeNodeIdProvider idProvider, String nodeId, ByteBuffer frame,
             FrameTupleAppender appender, List<Integer> childSeq, StaticContext staticContext)
             throws HyracksDataException {
+        buffer_size = Integer.parseInt(System.getProperty("vxquery.buffer_size"));
         this.nodeId = nodeId;
         try {
             parser = XMLReaderFactory.createXMLReader();
+            
+            System.out.println("XMLReader buffer:" +parser.getProperty("http://apache.org/xml/properties/input-buffer-size"));
             if (frame == null || appender == null) {
                 handler = new SAXContentHandler(attachTypes, idProvider);
             } else {
@@ -74,11 +78,7 @@ public class XMLParser {
 
     public void parseDocument(File file, ArrayBackedValueStorage abvs) throws HyracksDataException {
         try {
-            if (file.getName().toLowerCase().endsWith(".xml.gz")) {
-                in.setCharacterStream(new InputStreamReader(new GZIPInputStream(new FileInputStream(file))));
-            } else {
-                in.setCharacterStream(new InputStreamReader(new FileInputStream(file)));
-            }
+            in.setCharacterStream(new BufferedReader(new InputStreamReader(new FileInputStream(file)), buffer_size));
             parser.parse(in);
             handler.writeDocument(abvs);
         } catch (FileNotFoundException e) {
@@ -99,11 +99,7 @@ public class XMLParser {
     public void parseElements(File file, IFrameWriter writer, FrameTupleAccessor fta, int tupleIndex)
             throws HyracksDataException {
         try {
-            if (file.getName().toLowerCase().endsWith(".xml.gz")) {
-                in.setCharacterStream(new InputStreamReader(new GZIPInputStream(new FileInputStream(file))));
-            } else {
-                in.setCharacterStream(new InputStreamReader(new FileInputStream(file)));
-            }
+            in.setCharacterStream(new BufferedReader(new InputStreamReader(new FileInputStream(file)), buffer_size));
             handler.setupElementWriter(writer, fta, tupleIndex);
             parser.parse(in);
         } catch (FileNotFoundException e) {

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/pom.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/pom.xml b/vxquery-xtest/pom.xml
index 35bfa27..ee79b2a 100644
--- a/vxquery-xtest/pom.xml
+++ b/vxquery-xtest/pom.xml
@@ -50,6 +50,10 @@
                   <mainClass>org.apache.vxquery.xtest.Main</mainClass>
                   <name>xtest</name>
                 </program>
+                <program>
+                  <mainClass>org.apache.vxquery.xtest.util.DiskPerformance</mainClass>
+                  <name>diskperformance</name>
+                </program>
               </programs>
               <repositoryLayout>flat</repositoryLayout>
               <repositoryName>lib</repositoryName>

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/DiskPerformance.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/DiskPerformance.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/DiskPerformance.java
new file mode 100644
index 0000000..913d22e
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/DiskPerformance.java
@@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.filefilter.TrueFileFilter;
+import org.apache.vxquery.datamodel.builders.atomic.StringValueBuilder;
+import org.apache.vxquery.metadata.VXQueryIOFileFilter;
+import org.apache.vxquery.types.AnyType;
+import org.apache.vxquery.types.ElementType;
+import org.apache.vxquery.types.NameTest;
+import org.apache.vxquery.types.Quantifier;
+import org.apache.vxquery.types.SequenceType;
+import org.apache.vxquery.xmlparser.SAXContentHandler;
+import org.apache.vxquery.xmlparser.TreeNodeIdProvider;
+import org.apache.vxquery.xtest.util.tests.BufferedParsedCharacterStream;
+import org.apache.vxquery.xtest.util.tests.BufferedReaderBufferedStream;
+import org.apache.vxquery.xtest.util.tests.BufferedReaderStream;
+import org.apache.vxquery.xtest.util.tests.BufferedStream;
+import org.apache.vxquery.xtest.util.tests.IDiskTest;
+import org.apache.vxquery.xtest.util.tests.ParsedBufferedByteStream;
+import org.apache.vxquery.xtest.util.tests.ParsedBufferedCharacterStream;
+import org.apache.vxquery.xtest.util.tests.ParsedByteStream;
+import org.apache.vxquery.xtest.util.tests.ParsedCharacterStream;
+import org.apache.vxquery.xtest.util.tests.ReaderBufferedStream;
+import org.apache.vxquery.xtest.util.tests.ReaderStream;
+import org.apache.vxquery.xtest.util.tests.Stream;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+import edu.uci.ics.hyracks.algebricks.common.utils.Pair;
+import edu.uci.ics.hyracks.data.std.util.ArrayBackedValueStorage;
+
+public class DiskPerformance {
+    XMLReader parser;
+    SAXContentHandler handler;
+    Collection<File> cTestFiles;
+    Iterator<File> testFilesIt;
+
+    public DiskPerformance() {
+        Pair<XMLReader, SAXContentHandler> p = getNewParser();
+        parser = p.first;
+        handler = p.second;
+        cTestFiles = null;
+    }
+
+    public Pair<XMLReader, SAXContentHandler> getNewParser() {
+        XMLReader parser;
+        SAXContentHandler handler;
+
+        try {
+            parser = XMLReaderFactory.createXMLReader();
+            List<SequenceType> childSeq = new ArrayList<SequenceType>();
+            NameTest nt = new NameTest(createUTF8String(""), createUTF8String("data"));
+            childSeq.add(SequenceType.create(new ElementType(nt, AnyType.INSTANCE, false), Quantifier.QUANT_ONE));
+            handler = new SAXContentHandler(false, new TreeNodeIdProvider((short) 0), null, null, childSeq);
+            parser.setContentHandler(handler);
+            parser.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
+            return new Pair<XMLReader, SAXContentHandler>(parser, handler);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    public void setDirectory(String filename) {
+        File directory = new File(filename);
+        if (directory.isDirectory()) {
+            cTestFiles = FileUtils.listFiles(directory, new VXQueryIOFileFilter(), TrueFileFilter.INSTANCE);
+            if (cTestFiles.size() < 1) {
+                System.err.println("No XML files found in given directory.");
+                return;
+            }
+        }
+        testFilesIt = cTestFiles.iterator();
+    }
+
+    public String getNextFile() {
+        if (!testFilesIt.hasNext()) {
+            testFilesIt = cTestFiles.iterator();
+        }
+        return testFilesIt.next().getAbsolutePath();
+    }
+
+    private byte[] createUTF8String(String str) {
+        ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
+        StringValueBuilder svb = new StringValueBuilder();
+        try {
+            svb.write(str, abvs.getDataOutput());
+        } catch (IOException e) {
+            throw new IllegalStateException(e);
+        }
+        return Arrays.copyOf(abvs.getByteArray(), abvs.getLength());
+    }
+
+    public static void main(String... args) throws IOException {
+        // First Argument (XML folder)
+        if (args.length < 1) {
+            System.err.println("Please provide a directory for the test XML documents.");
+            return;
+        }
+        // Second argument (threads)
+        int threads = 1;
+        if (args.length > 1) {
+            threads = Integer.parseInt(args[1]);
+        }
+
+        // Third argument (repeat)
+        int repeat = 1;
+        if (args.length > 2) {
+            repeat = Integer.parseInt(args[2]);
+        }
+
+        // Fourth argument (buffer size)
+        int bufferSize = -1;
+        if (args.length > 3) {
+            bufferSize = Integer.parseInt(args[3]);
+        }
+
+        DiskPerformance dp = new DiskPerformance();
+        dp.setDirectory(args[0]);
+
+        ArrayList<Class> tests = new ArrayList<Class>();
+        // Character Streams
+        tests.add(ParsedBufferedCharacterStream.class);
+        tests.add(BufferedParsedCharacterStream.class);
+        tests.add(ParsedCharacterStream.class);
+        tests.add(BufferedReaderBufferedStream.class);
+        tests.add(BufferedReaderStream.class);
+        tests.add(ReaderBufferedStream.class);
+        tests.add(ReaderStream.class);
+        // Byte Streams
+        tests.add(ParsedBufferedByteStream.class);
+        tests.add(ParsedByteStream.class);
+        tests.add(BufferedStream.class);
+        tests.add(Stream.class);
+
+        System.out.println("------");
+        System.out.println("Started Test Group: " + new Date());
+        System.out.println("Thread: " + threads);
+        System.out.println("Repeat: " + repeat);
+        System.out.println("Buffer: " + bufferSize);
+        System.out.println("------");
+
+        for (Class<IDiskTest> testClass : tests) {
+            for (int r = 0; r < repeat; ++r) {
+                try {
+                    if (threads > 1) {
+                        runThreadTest(testClass, dp, threads, bufferSize);
+                    } else {
+                        IDiskTest test = testClass.newInstance();
+                        test.setFilename(dp.getNextFile());
+                        test.setBufferSize(bufferSize);
+                        test.setParser(dp.parser);
+                        test.run();
+                    }
+                } catch (InstantiationException e) {
+                    e.printStackTrace();
+                } catch (IllegalAccessException e) {
+                    e.printStackTrace();
+                }
+
+            }
+            System.out.println("------");
+        }
+
+    }
+
+    static <T> void runThreadTest(Class<T> testType, DiskPerformance dp, int threads, int bufferSize) throws InstantiationException,
+            IllegalAccessException {
+        ExecutorService es = Executors.newCachedThreadPool();
+        ArrayList<IDiskTest> threadTests = new ArrayList<IDiskTest>();
+        for (int i = 0; i < threads; ++i) {
+            threadTests.add((IDiskTest) testType.newInstance());
+        }
+        for (IDiskTest test : threadTests) {
+            test.setFilename(dp.getNextFile());
+            test.setBufferSize(bufferSize);
+            test.setParser(dp.getNewParser().first);
+            es.execute((Runnable) test);
+        }
+        es.shutdown();
+        try {
+            es.awaitTermination(60, TimeUnit.MINUTES);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        System.out.println("Completed thread batch: " + new Date());
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/AbstractDiskTest.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/AbstractDiskTest.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/AbstractDiskTest.java
new file mode 100644
index 0000000..63d5922
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/AbstractDiskTest.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.lang.management.OperatingSystemMXBean;
+
+import org.xml.sax.XMLReader;
+
+abstract class AbstractDiskTest implements IDiskTest, Runnable {
+    private String filename;
+    private int bufferSize;
+    protected XMLReader parser;
+
+    public AbstractDiskTest() {
+    }
+
+    public AbstractDiskTest(String filename, int bufferSize) {
+        setFilename(filename);
+        setBufferSize(bufferSize);
+    }
+
+    public void setFilename(String filename) {
+        this.filename = filename;
+    }
+
+    public void setBufferSize(int bufferSize) {
+        this.bufferSize = bufferSize;
+    }
+
+    public void setParser(XMLReader parser) {
+        this.parser = parser;
+    }
+
+    public void start() {
+        run();
+    }
+
+    public void run() {
+        OperatingSystemMXBean os = ManagementFactory.getOperatingSystemMXBean();
+        System.out.printf(filename + "\t" + getMessage() + " - Starting%n");
+        long start = System.nanoTime();
+        try {
+            long checkSum = test(filename, bufferSize);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        long end = System.nanoTime();
+        // System.out.printf("checkSum: %d%n", checkSum);
+        System.out.printf(filename + "\t" + getMessage() + "%.2f MB/s", 1024 * 1e9 / (end - start));
+        if (isBuffered() && bufferSize > 0) {
+            System.out.printf("\t%.1f KB buffer", bufferSize / 1024.0);
+        }
+        System.out.println();
+        System.out.printf("%.2f%% load average last minute%n", os.getSystemLoadAverage());
+    }
+
+    public boolean isBuffered() {
+        return true;
+    }
+
+    abstract public String getMessage();
+
+    abstract public long test(String filename, int bufferSize) throws IOException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedParsedCharacterStream.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedParsedCharacterStream.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedParsedCharacterStream.java
new file mode 100644
index 0000000..37527ae
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedParsedCharacterStream.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+public class BufferedParsedCharacterStream extends AbstractDiskTest {
+    @Override
+    public String getMessage() {
+        return "Buffered Parsed - Character Stream\t";
+    }
+
+    @Override
+    public long test(String filename, int bufferSize) throws IOException {
+        try {
+            if (bufferSize > 0) {
+                parser.setProperty("http://apache.org/xml/properties/input-buffer-size", new Integer(bufferSize));
+            }
+            InputStreamReader f = new InputStreamReader(new FileInputStream(filename));
+            InputSource in = new InputSource();
+            in.setCharacterStream(f);
+            parser.parse(in);
+        } catch (SAXException e) {
+            e.printStackTrace();
+        }
+        return -1;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedReaderBufferedStream.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedReaderBufferedStream.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedReaderBufferedStream.java
new file mode 100644
index 0000000..c553a3e
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedReaderBufferedStream.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+public class BufferedReaderBufferedStream extends AbstractDiskTest {
+    @Override
+    public String getMessage() {
+        return "Buffered Reader - Buffered Stream\t";
+    }
+
+    @Override
+    public long test(String filename, int bufferSize) throws IOException {
+        BufferedReader f;
+        if (bufferSize > 0) {
+            f = new BufferedReader(new InputStreamReader(new BufferedInputStream(new FileInputStream(filename),
+                    bufferSize)), bufferSize);
+        } else {
+            f = new BufferedReader(new InputStreamReader(new BufferedInputStream(new FileInputStream(filename))));
+        }
+        int b;
+        long checkSum = 0L;
+        while ((b = f.read()) != -1)
+            checkSum += b;
+        f.close();
+        return checkSum;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedReaderStream.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedReaderStream.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedReaderStream.java
new file mode 100644
index 0000000..20b9bab
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedReaderStream.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+public class BufferedReaderStream extends AbstractDiskTest {
+    @Override
+    public String getMessage() {
+        return "Buffered Reader - Stream\t\t";
+    }
+
+    @Override
+    public long test(String filename, int bufferSize) throws IOException {
+        BufferedReader f;
+        if (bufferSize > 0) {
+            f = new BufferedReader(new InputStreamReader(new FileInputStream(filename)), bufferSize);
+        } else {
+            f = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
+        }
+        int b;
+        long checkSum = 0L;
+        while ((b = f.read()) != -1)
+            checkSum += b;
+        f.close();
+        return checkSum;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedStream.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedStream.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedStream.java
new file mode 100644
index 0000000..2bf582e
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/BufferedStream.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+public class BufferedStream extends AbstractDiskTest {
+    @Override
+    public String getMessage() {
+        return "Buffered Stream\t\t\t\t";
+    }
+
+    @Override
+    public long test(String filename, int bufferSize) throws IOException {
+        BufferedInputStream f;
+        if (bufferSize > 0) {
+            f = new BufferedInputStream(new FileInputStream(filename), bufferSize);
+        } else {
+            f = new BufferedInputStream(new FileInputStream(filename));
+        }
+        int b;
+        long checkSum = 0L;
+        while ((b = f.read()) != -1)
+            checkSum += b;
+        f.close();
+        return checkSum;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/IDiskTest.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/IDiskTest.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/IDiskTest.java
new file mode 100644
index 0000000..09ff240
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/IDiskTest.java
@@ -0,0 +1,15 @@
+package org.apache.vxquery.xtest.util.tests;
+
+import org.xml.sax.XMLReader;
+
+public interface IDiskTest {
+    public void setBufferSize(int bufferSize);
+
+    public void setFilename(String absolutePath);
+
+    public void setParser(XMLReader parser);
+
+    public void run();
+
+    public void start();
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedBufferedByteStream.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedBufferedByteStream.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedBufferedByteStream.java
new file mode 100644
index 0000000..5ae2a34
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedBufferedByteStream.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+public class ParsedBufferedByteStream extends AbstractDiskTest {
+    @Override
+    public String getMessage() {
+        return "Parsed - Buffered Byte Stream\t\t";
+    }
+
+    @Override
+    public long test(String filename, int bufferSize) throws IOException {
+        try {
+            BufferedInputStream f;
+            if (bufferSize > 0) {
+                f = new BufferedInputStream(new FileInputStream(filename), bufferSize);
+            } else {
+                f = new BufferedInputStream(new FileInputStream(filename));
+            }
+            InputSource in = new InputSource();
+            in.setByteStream(f);
+            in.setEncoding("UTF-8");
+            parser.parse(in);
+        } catch (SAXException e) {
+            e.printStackTrace();
+        }
+        return -1;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedBufferedCharacterStream.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedBufferedCharacterStream.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedBufferedCharacterStream.java
new file mode 100644
index 0000000..c2d21d4
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedBufferedCharacterStream.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+public class ParsedBufferedCharacterStream extends AbstractDiskTest implements IDiskTest {
+    @Override
+    public String getMessage() {
+        return "Parsed - Buffered Character Stream\t";
+    }
+
+    @Override
+    public long test(String filename, int bufferSize) throws IOException {
+        try {
+            BufferedReader f;
+            if (bufferSize > 0) {
+                f = new BufferedReader(new InputStreamReader(new FileInputStream(filename)), bufferSize);
+            } else {
+                f = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
+            }
+            InputSource in = new InputSource();
+            in.setCharacterStream(f);
+            parser.parse(in);
+        } catch (SAXException e) {
+            e.printStackTrace();
+        }
+        return -1;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedByteStream.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedByteStream.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedByteStream.java
new file mode 100644
index 0000000..2c8b85d
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedByteStream.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+public class ParsedByteStream extends AbstractDiskTest {
+    @Override
+    public String getMessage() {
+        return "Parsed - Byte Stream\t\t\t";
+    }
+
+    @Override
+    public boolean isBuffered() {
+        return false;
+    }
+
+    @Override
+    public long test(String filename, int bufferSize) throws IOException {
+        try {
+            InputSource in = new InputSource();
+            in.setByteStream(new FileInputStream(filename));
+            in.setEncoding("UTF-8");
+            parser.parse(in);
+        } catch (SAXException e) {
+            e.printStackTrace();
+        }
+        return -1;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedCharacterStream.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedCharacterStream.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedCharacterStream.java
new file mode 100644
index 0000000..3dc9ed4
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ParsedCharacterStream.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+public class ParsedCharacterStream extends AbstractDiskTest {
+    @Override
+    public String getMessage() {
+        return "Parsed - Character Stream\t\t";
+    }
+
+    @Override
+    public boolean isBuffered() {
+        return false;
+    }
+
+    @Override
+    public long test(String filename, int bufferSize) throws IOException {
+        try {
+            InputStreamReader f = new InputStreamReader(new FileInputStream(filename));
+            InputSource in = new InputSource();
+            in.setCharacterStream(f);
+            parser.parse(in);
+        } catch (SAXException e) {
+            e.printStackTrace();
+        }
+        return -1;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ReaderBufferedStream.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ReaderBufferedStream.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ReaderBufferedStream.java
new file mode 100644
index 0000000..3d87f96
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ReaderBufferedStream.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+public class ReaderBufferedStream extends AbstractDiskTest {
+    @Override
+    public String getMessage() {
+        return "Reader - Buffered Stream\t\t";
+    }
+
+    @Override
+    public long test(String filename, int bufferSize) throws IOException {
+        InputStreamReader f;
+        if (bufferSize > 0) {
+            f = new InputStreamReader(new BufferedInputStream(new FileInputStream(filename), bufferSize));
+        } else {
+            f = new InputStreamReader(new BufferedInputStream(new FileInputStream(filename)));
+        }
+        int b;
+        long checkSum = 0L;
+        while ((b = f.read()) != -1)
+            checkSum += b;
+        f.close();
+        return checkSum;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ReaderStream.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ReaderStream.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ReaderStream.java
new file mode 100644
index 0000000..2a01275
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/ReaderStream.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+public class ReaderStream extends AbstractDiskTest {
+    @Override
+    public String getMessage() {
+        return "Reader - Stream\t\t\t\t";
+    }
+
+    @Override
+    public boolean isBuffered() {
+        return false;
+    }
+
+    @Override
+    public long test(String filename, int bufferSize) throws IOException {
+        InputStreamReader f = new InputStreamReader(new FileInputStream(filename));
+        int b;
+        long checkSum = 0L;
+        while ((b = f.read()) != -1)
+            checkSum += b;
+        f.close();
+        return checkSum;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/1b7d3aaf/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/Stream.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/Stream.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/Stream.java
new file mode 100644
index 0000000..96e7184
--- /dev/null
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/util/tests/Stream.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.xtest.util.tests;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+
+public class Stream extends AbstractDiskTest {
+    @Override
+    public String getMessage() {
+        return "Stream\t\t\t\t\t\t";
+    }
+
+    @Override
+    public boolean isBuffered() {
+        return false;
+    }
+
+    @Override
+    public long test(String filename, int bufferSize) throws IOException {
+        FileInputStream f = new FileInputStream(filename);
+        int b;
+        long checkSum = 0L;
+        while ((b = f.read()) != -1)
+            checkSum += b;
+        f.close();
+        return checkSum;
+    }
+}