http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0e21afa7/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/ReportBuilderHelper.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/ReportBuilderHelper.java b/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/ReportBuilderHelper.java deleted file mode 100644 index 93ae819..0000000 --- a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/ReportBuilderHelper.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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.asterix.experiment.report; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; - -public class ReportBuilderHelper { - - public static void main(String[] args) throws Exception { - String line = "INFO: DataGen[13][During ingestion only][TimeToInsert100000] 10651 in milliseconds"; - System.out.println(getEndIndexOf("DataGen[1][During ingestion only][TimeToInsert100000] 10651 in milliseconds", - "DataGen[")); - System.out.println(getLong(line, "[TimeToInsert100000]", "in")); - System.out.println(getLong(line, "DataGen[", "]")); - //SIE1AReportBuilder rb = new SIE1AReportBuilder("/Users/kisskys/workspace/asterix_experiment/run-log/run-log-backup/log-1435560604069/run.log"); - //System.out.println(rb.getInstantaneousInsertPS()); - } - - public static int getEndIndexOf(String target, String pattern) { - //get the end index of the pattern string in target string. - int index = target.indexOf(pattern); - if (index != -1) { - return target.indexOf(pattern) + pattern.length(); - } - return -1; - } - - public static long getLong(String line, String beginPattern, String endPattern) { - int idBeginIdx = getEndIndexOf(line, beginPattern); - int idEndIdx = line.indexOf(endPattern, idBeginIdx); - return Long.parseLong(line.substring(idBeginIdx, idEndIdx).trim()); - } - - public static int getInt(String line, String beginPattern, String endPattern) { - int idBeginIdx = getEndIndexOf(line, beginPattern); - int idEndIdx = line.indexOf(endPattern, idBeginIdx); - return Integer.parseInt(line.substring(idBeginIdx, idEndIdx).trim()); - } - - public static double getDouble(String line, String beginPattern, String endPattern) { - int idBeginIdx = getEndIndexOf(line, beginPattern); - int idEndIdx = line.indexOf(endPattern, idBeginIdx); - return Double.parseDouble(line.substring(idBeginIdx, idEndIdx).trim()); - } - - public static String getString(String line, String beginPattern, String endPattern) { - int idBeginIdx = getEndIndexOf(line, beginPattern); - int idEndIdx = line.indexOf(endPattern, idBeginIdx); - return line.substring(idBeginIdx, idEndIdx).trim(); - } - - public static String getString(String line, String endPattern) { - int idEndIdx = line.indexOf(endPattern, 0); - return line.substring(0, idEndIdx).trim(); - } - - public static long getTimeStampAsLong(String line, SimpleDateFormat format) throws ParseException { - //Jul 09, 2015 11:58:08 - //String line = "Jul 09, 2015 11:58:09 PM org.apache.hyracks.storage.am.lsm.common.impls.LSMHarness flush"; - //DateFormat format; - //format = new SimpleDateFormat("MMM dd, yyyy hh:mm:ss"); - Date parseDate = format.parse(line); - return parseDate.getTime(); - } - - protected static FileOutputStream openOutputFile(String filepath) throws IOException { - File file = new File(filepath); - if (file.exists()) { - //throw new IOException(filepath + "already exists"); - file.delete(); - } - file.createNewFile(); - return new FileOutputStream(file); - } - - protected static void closeOutputFile(FileOutputStream fos) throws IOException { - fos.flush(); - fos.close(); - fos = null; - } - -}
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0e21afa7/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/ReportBuilderRunner.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/ReportBuilderRunner.java b/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/ReportBuilderRunner.java deleted file mode 100644 index eba8f07..0000000 --- a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/ReportBuilderRunner.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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.asterix.experiment.report; - -public class ReportBuilderRunner { - public static final boolean REPORT_SIE1 = false; - public static final boolean REPORT_SIE2 = false; - public static final boolean REPORT_SIE3 = false; - public static final boolean REPORT_SIE4 = false; - public static final boolean REPORT_SIE5 = true; - public static final boolean REPORT_SIE3_PROFILE = false; - - public static void main(String[] args) throws Exception { - - if (REPORT_SIE1) { - SIE1ReportBuilderRunner sie1 = new SIE1ReportBuilderRunner(); - sie1.generateSIE1IPS(); - // sie1.generateInstantaneousInsertPS(); - sie1.generateIndexSize(); - sie1.generateGanttInstantaneousInsertPS(); - sie1.generateAccumulatedInsertPS(); - } - - if (REPORT_SIE2) { - SIE2ReportBuilderRunner sie2 = new SIE2ReportBuilderRunner(); - sie2.generateOverallInsertPS(); - sie2.generateAccumulatedInsertPS(); - sie2.generateQueryPS(); - sie2.generateAverageQueryResultCount(); - sie2.generateAverageQueryResponseTime(); - sie2.generateInstantaneousInsertPS(); - sie2.generateGanttInstantaneousInsertPS(); - sie2.generateSelectQueryResponseTime(); - sie2.generateSelectQueryResultCount(); - } - - if (REPORT_SIE3) { - SIE3ReportBuilderRunner sie3 = new SIE3ReportBuilderRunner(); - sie3.generateIndexCreationTime(); - sie3.generateIndexSize(); - sie3.generateSelectQueryResponseTime(); - sie3.generateJoinQueryResponseTime(); - sie3.generateSelectQueryResultCount(); - sie3.generateJoinQueryResultCount(); - - // sie3.generateSelectQueryProfiledSidxSearchTime(); - // sie3.generateSelectQueryProfiledPidxSearchTime(); - // sie3.generateJoinQueryProfiledSidxSearchTime(); - // sie3.generateJoinQueryProfiledPidxSearchTime(); - // sie3.generateJoinQueryProfiledSeedPidxSearchTime(); - // sie3.generateSelectQueryProfiledSidxCacheMiss(); - // sie3.generateSelectQueryProfiledPidxCacheMiss(); - // sie3.generateJoinQueryProfiledSidxCacheMiss(); - // sie3.generateJoinQueryProfiledPidxCacheMiss(); - // sie3.generateJoinQueryProfiledSeedPidxCacheMiss(); - // sie3.generateSelectQueryProfiledFalsePositive(); - // sie3.generateJoinQueryProfiledFalsePositive(); - } - - if (REPORT_SIE4) { - SIE4ReportBuilderRunner sie4 = new SIE4ReportBuilderRunner(); - sie4.generateIndexCreationTime(); - sie4.generateIndexSize(); - sie4.generateSelectQueryResponseTime(); - sie4.generateJoinQueryResponseTime(); - sie4.generateSelectQueryResultCount(); - sie4.generateJoinQueryResultCount(); - } - - if (REPORT_SIE5) { - SIE5ReportBuilderRunner sie5 = new SIE5ReportBuilderRunner(); - sie5.generateOverallInsertPS(); - sie5.generateAccumulatedInsertPS(); - sie5.generateQueryPS(); - sie5.generateAverageQueryResultCount(); - sie5.generateAverageQueryResponseTime(); - sie5.generateInstantaneousInsertPS(); - sie5.generateGanttInstantaneousInsertPS(); - sie5.generateSelectQueryResponseTime(); - sie5.generateSelectQueryResultCount(); - } - - if (REPORT_SIE3_PROFILE) { - String executionTimeFilePath[] = new String[5]; - executionTimeFilePath[0] = "/Users/kisskys/workspace/asterix_master/resultLog/Mem3g-Disk4g-part4-Lsev-Jvm5g-Lock6g/profile-exp3/SpatialIndexExperiment3Dhbtree/logs/executionTime-130.149.249.52.txt"; - executionTimeFilePath[1] = "/Users/kisskys/workspace/asterix_master/resultLog/Mem3g-Disk4g-part4-Lsev-Jvm5g-Lock6g/profile-exp3/SpatialIndexExperiment3Dhvbtree/logs/executionTime-130.149.249.52.txt"; - executionTimeFilePath[2] = "/Users/kisskys/workspace/asterix_master/resultLog/Mem3g-Disk4g-part4-Lsev-Jvm5g-Lock6g/profile-exp3/SpatialIndexExperiment3Rtree/logs/executionTime-130.149.249.52.txt"; - executionTimeFilePath[3] = "/Users/kisskys/workspace/asterix_master/resultLog/Mem3g-Disk4g-part4-Lsev-Jvm5g-Lock6g/profile-exp3/SpatialIndexExperiment3Shbtree/logs/executionTime-130.149.249.52.txt"; - executionTimeFilePath[4] = "/Users/kisskys/workspace/asterix_master/resultLog/Mem3g-Disk4g-part4-Lsev-Jvm5g-Lock6g/profile-exp3/SpatialIndexExperiment3Sif/logs/executionTime-130.149.249.52.txt"; - - for (int i = 0; i < 5; i++) { - String filePath = executionTimeFilePath[i]; - OperatorProfilerReportBuilder oprb = new OperatorProfilerReportBuilder(filePath); - System.out.println("-------- " + i + " ----------\n"); - System.out.println(oprb.getIdxNumber(false, 0)); - System.out.println(oprb.getIdxNumber(false, 1)); - System.out.println(oprb.getIdxNumber(false, 2)); - System.out.println(oprb.getIdxNumber(false, 3)); - System.out.println(oprb.getIdxNumber(false, 4)); - System.out.println(oprb.getIdxNumber(true, 0)); - System.out.println(oprb.getIdxNumber(true, 1)); - System.out.println(oprb.getIdxNumber(true, 2)); - System.out.println(oprb.getIdxNumber(true, 3)); - } - - } - - } -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0e21afa7/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE1ReportBuilder.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE1ReportBuilder.java b/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE1ReportBuilder.java deleted file mode 100644 index 2e04615..0000000 --- a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE1ReportBuilder.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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.asterix.experiment.report; - -public class SIE1ReportBuilder extends AbstractDynamicDataEvalReportBuilder { - public SIE1ReportBuilder(String expHomePath, String expName, String runLogFileName) { - super(expHomePath, expName, runLogFileName, false); - } - - @Override - public String getOverallInsertPS(int minutes) throws Exception { - renewStringBuilder(); - openRunLog(); - try { - if (!moveToExperimentBegin()) { - //The experiment run log doesn't exist in this run log file - return null; - } - - String line; - while ((line = br.readLine()) != null) { - if (line.contains("int64")) { - line = br.readLine(); - rsb.append(Long.parseLong(line) / (minutes * 60)); - break; - } - } - - return rsb.toString(); - } finally { - closeRunLog(); - } - } - - @Override - public String getInstantaneousQueryPS() throws Exception { - return null; - } - - @Override - public String getQueryPS(int minutes) throws Exception { - return null; - // renewStringBuilder(); - // openRunLog(); - // try { - // - // return getResult(); - // } finally { - // closeRunLog(); - // } - } -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0e21afa7/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE1ReportBuilderRunner.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE1ReportBuilderRunner.java b/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE1ReportBuilderRunner.java deleted file mode 100644 index bab69a0..0000000 --- a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE1ReportBuilderRunner.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * 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.asterix.experiment.report; - -import java.io.FileOutputStream; -import java.util.ArrayList; - -public class SIE1ReportBuilderRunner { - String expHomePath = "/Users/kisskys/workspace/asterix_master/resultLog/MemBuf3g-DiskBuf3g-Lsev-Jvm7g-Lock0g/exp1/"; - String runLogFileName = "run-exp1.log"; - String outputFilePath = "/Users/kisskys/workspace/asterix_master/resultLog/MemBuf3g-DiskBuf3g-Lsev-Jvm7g-Lock0g/result-report/"; - - SIE1ReportBuilder sie1ADhbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1ADhbtree", - runLogFileName); - SIE1ReportBuilder sie1ADhvbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1ADhvbtree", - runLogFileName); - SIE1ReportBuilder sie1ARtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1ARtree", runLogFileName); - SIE1ReportBuilder sie1AShbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1AShbtree", - runLogFileName); - SIE1ReportBuilder sie1ASif = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1ASif", runLogFileName); - - SIE1ReportBuilder sie1BDhbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1BDhbtree", - runLogFileName); - SIE1ReportBuilder sie1BDhvbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1BDhvbtree", - runLogFileName); - SIE1ReportBuilder sie1BRtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1BRtree", runLogFileName); - SIE1ReportBuilder sie1BShbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1BShbtree", - runLogFileName); - SIE1ReportBuilder sie1BSif = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1BSif", runLogFileName); - - SIE1ReportBuilder sie1CDhbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1CDhbtree", - runLogFileName); - SIE1ReportBuilder sie1CDhvbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1CDhvbtree", - runLogFileName); - SIE1ReportBuilder sie1CRtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1CRtree", runLogFileName); - SIE1ReportBuilder sie1CShbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1CShbtree", - runLogFileName); - SIE1ReportBuilder sie1CSif = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1CSif", runLogFileName); - - SIE1ReportBuilder sie1DDhbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1DDhbtree", - runLogFileName); - SIE1ReportBuilder sie1DDhvbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1DDhvbtree", - runLogFileName); - SIE1ReportBuilder sie1DRtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1DRtree", runLogFileName); - SIE1ReportBuilder sie1DShbtree = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1DShbtree", - runLogFileName); - SIE1ReportBuilder sie1DSif = new SIE1ReportBuilder(expHomePath, "SpatialIndexExperiment1DSif", runLogFileName); - - StringBuilder sb = new StringBuilder(); - - /** - * generate sie1_ips.txt - */ - public void generateSIE1IPS() throws Exception { - int minutes = 60; - sb.setLength(0); - sb.append("# sie1 ips(inserts per second) report\n"); - sb.append("# number of nodes, dhbtree, dhvbtree, rtree, shbtree, sif\n"); - sb.append("1,").append(sie1ADhbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1ADhvbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1ARtree.getOverallInsertPS(minutes)).append(",") - .append(sie1AShbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1ASif.getOverallInsertPS(minutes)).append("\n"); - - sb.append("2,").append(sie1BDhbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1BDhvbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1BRtree.getOverallInsertPS(minutes)).append(",") - .append(sie1BShbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1BSif.getOverallInsertPS(minutes)).append("\n"); - - sb.append("4,").append(sie1CDhbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1CDhvbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1CRtree.getOverallInsertPS(minutes)).append(",") - .append(sie1CShbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1CSif.getOverallInsertPS(minutes)).append("\n"); - - sb.append("8,").append(sie1DDhbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1DDhvbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1DRtree.getOverallInsertPS(minutes)).append(",") - .append(sie1DShbtree.getOverallInsertPS(minutes)).append(",") - .append(sie1DSif.getOverallInsertPS(minutes)).append("\n"); - - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie1_ips.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - - /** - * generate sie1_accumulated_insert_ps.txt - */ - public void generateAccumulatedInsertPS() throws Exception { - int targetRound = 721; //(3600 seconds / 5seconds) + 1 - int roundInterval = 5; - - ArrayList<Long> ipsListDhbtree = new ArrayList<Long>(); - ArrayList<Long> ipsListDhvbtree = new ArrayList<Long>(); - ArrayList<Long> ipsListRtree = new ArrayList<Long>(); - ArrayList<Long> ipsListShbtree = new ArrayList<Long>(); - ArrayList<Long> ipsListSif = new ArrayList<Long>(); - sie1DDhbtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListDhbtree); - sie1DDhvbtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListDhvbtree); - sie1DRtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListRtree); - sie1DShbtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListShbtree); - sie1DSif.getAllNodesAccumulatedInsertPS(targetRound, ipsListSif); - - sb.setLength(0); - sb.append("# sie1 accumulated inserts per second report\n"); - sb.append("# time, dhbtree, dhvbtree, rtree, shbtree, sif\n"); - - for (int i = 0; i < targetRound; i++) { - sb.append("" + (i * roundInterval) + "," + ipsListDhbtree.get(i) + "," + ipsListDhvbtree.get(i) + "," - + ipsListRtree.get(i) + "," + ipsListShbtree.get(i) + "," + ipsListSif.get(i) + "\n"); - } - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie1_accumulated_insert_ps.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - ipsListDhbtree.clear(); - ipsListDhvbtree.clear(); - ipsListRtree.clear(); - ipsListShbtree.clear(); - ipsListSif.clear(); - } - - public void generateInstantaneousInsertPS() throws Exception { - int nodeCount = 8; - for (int i = 0; i < nodeCount; i++) { - sb.setLength(0); - sb.append("# sie1 8nodes(8 dataGen) instantaneous inserts per second report\n"); - sb.append(sie1DDhbtree.getInstantaneousInsertPS(i, false)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie1_8nodes_instantaneous_insert_ps_dhbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < nodeCount; i++) { - sb.setLength(0); - sb.append("# sie1 8nodes(8 dataGen) instantaneous inserts per second report\n"); - sb.append(sie1DDhvbtree.getInstantaneousInsertPS(i, false)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie1_8nodes_instantaneous_insert_ps_dhvbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < nodeCount; i++) { - sb.setLength(0); - sb.append("# sie1 8nodes(8 dataGen) instantaneous inserts per second report\n"); - sb.append(sie1DRtree.getInstantaneousInsertPS(i, false)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie1_8nodes_instantaneous_insert_ps_rtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < nodeCount; i++) { - sb.setLength(0); - sb.append("# sie1 8nodes(8 dataGen) instantaneous inserts per second report\n"); - sb.append(sie1DShbtree.getInstantaneousInsertPS(i, false)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie1_8nodes_instantaneous_insert_ps_shbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < nodeCount; i++) { - sb.setLength(0); - sb.append("# sie1 8nodes(8 dataGen) instantaneous inserts per second report\n"); - sb.append(sie1DSif.getInstantaneousInsertPS(i, false)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie1_8nodes_instantaneous_insert_ps_sif_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - } - - public void generateIndexSize() throws Exception { - sb.setLength(0); - sb.append("# sie1 index size report\n"); - - sb.append("# number of nodes, dhbtree, dhvbtree, rtree, shbtree, sif\n"); - sb.append("1,").append(sie1ADhbtree.getIndexSize("Tweets_idx_dhbtreeLocation/device_id")).append(",") - .append(sie1ADhvbtree.getIndexSize("Tweets_idx_dhvbtreeLocation/device_id")).append(",") - .append(sie1ARtree.getIndexSize("Tweets_idx_rtreeLocation/device_id")).append(",") - .append(sie1AShbtree.getIndexSize("Tweets_idx_shbtreeLocation/device_id")).append(",") - .append(sie1ASif.getIndexSize("Tweets_idx_sifLocation/device_id")).append(",") - .append(sie1ASif.getIndexSize("Tweets_idx_Tweets/device_id")).append("\n"); - sb.append("2,").append(sie1BDhbtree.getIndexSize("Tweets_idx_dhbtreeLocation/device_id")).append(",") - .append(sie1BDhvbtree.getIndexSize("Tweets_idx_dhvbtreeLocation/device_id")).append(",") - .append(sie1BRtree.getIndexSize("Tweets_idx_rtreeLocation/device_id")).append(",") - .append(sie1BShbtree.getIndexSize("Tweets_idx_shbtreeLocation/device_id")).append(",") - .append(sie1BSif.getIndexSize("Tweets_idx_sifLocation/device_id")).append(",") - .append(sie1BSif.getIndexSize("Tweets_idx_Tweets/device_id")).append("\n"); - sb.append("4,").append(sie1CDhbtree.getIndexSize("Tweets_idx_dhbtreeLocation/device_id")).append(",") - .append(sie1CDhvbtree.getIndexSize("Tweets_idx_dhvbtreeLocation/device_id")).append(",") - .append(sie1CRtree.getIndexSize("Tweets_idx_rtreeLocation/device_id")).append(",") - .append(sie1CShbtree.getIndexSize("Tweets_idx_shbtreeLocation/device_id")).append(",") - .append(sie1CSif.getIndexSize("Tweets_idx_sifLocation/device_id")).append(",") - .append(sie1CSif.getIndexSize("Tweets_idx_Tweets/device_id")).append("\n"); - sb.append("8,").append(sie1DDhbtree.getIndexSize("Tweets_idx_dhbtreeLocation/device_id")).append(",") - .append(sie1DDhvbtree.getIndexSize("Tweets_idx_dhvbtreeLocation/device_id")).append(",") - .append(sie1DRtree.getIndexSize("Tweets_idx_rtreeLocation/device_id")).append(",") - .append(sie1DShbtree.getIndexSize("Tweets_idx_shbtreeLocation/device_id")).append(",") - .append(sie1DSif.getIndexSize("Tweets_idx_sifLocation/device_id")).append(",") - .append(sie1DSif.getIndexSize("Tweets_idx_Tweets/device_id")).append("\n"); - - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie1_index_size.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - - public void generateGanttInstantaneousInsertPS() throws Exception { - - SIE1ReportBuilder dhbtree = sie1DDhbtree; - SIE1ReportBuilder dhvbtree = sie1DDhvbtree; - SIE1ReportBuilder rtree = sie1DRtree; - SIE1ReportBuilder shbtree = sie1DShbtree; - SIE1ReportBuilder sif = sie1DSif; - String sie1Type = "D"; - String logDirPrefix = ""; - - for (int i = 0; i < 1; i++) { - sb.setLength(0); - sb.append("# sie1 1node(1 dataGen) instantaneous inserts per second report\n"); - sb.append(dhbtree.getInstantaneousInsertPS(i, true)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie1_gantt_1node_instantaneous_insert_ps_dhbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 1; i++) { - sb.setLength(0); - sb.append("# sie1 1node(1 dataGen) instantaneous inserts per second report\n"); - sb.append(dhvbtree.getInstantaneousInsertPS(i, true)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie1_gantt_1node_instantaneous_insert_ps_dhvbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 1; i++) { - sb.setLength(0); - sb.append("# sie1 1node(1 dataGen) instantaneous inserts per second report\n"); - sb.append(rtree.getInstantaneousInsertPS(i, true)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie1_gantt_1node_instantaneous_insert_ps_rtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 1; i++) { - sb.setLength(0); - sb.append("# sie1 1node(1 dataGen) instantaneous inserts per second report\n"); - sb.append(shbtree.getInstantaneousInsertPS(i, true)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie1_gantt_1node_instantaneous_insert_ps_shbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 1; i++) { - sb.setLength(0); - sb.append("# sie1 1node(1 dataGen) instantaneous inserts per second report\n"); - sb.append(sif.getInstantaneousInsertPS(i, true)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie1_gantt_1node_instantaneous_insert_ps_sif_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - - long dataGenStartTime = dhbtree.getDataGenStartTimeStamp(); - NCLogReportBuilder ncLogReportBuilder = new NCLogReportBuilder(expHomePath + "SpatialIndexExperiment1" - + sie1Type + "Dhbtree/" + logDirPrefix + "logs/a1_node1.log"); - sb.setLength(0); - sb.append(ncLogReportBuilder.getFlushMergeEventAsGanttChartFormat(dataGenStartTime)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie1_gantt_1node_flush_merge_dhbtree.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - dataGenStartTime = dhvbtree.getDataGenStartTimeStamp(); - ncLogReportBuilder = new NCLogReportBuilder(expHomePath + "SpatialIndexExperiment1" + sie1Type + "Dhvbtree/" - + logDirPrefix + "logs/a1_node1.log"); - sb.setLength(0); - sb.append(ncLogReportBuilder.getFlushMergeEventAsGanttChartFormat(dataGenStartTime)); - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie1_gantt_1node_flush_merge_dhvbtree.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - dataGenStartTime = rtree.getDataGenStartTimeStamp(); - ncLogReportBuilder = new NCLogReportBuilder(expHomePath + "SpatialIndexExperiment1" + sie1Type + "Rtree/" - + logDirPrefix + "logs/a1_node1.log"); - sb.setLength(0); - sb.append(ncLogReportBuilder.getFlushMergeEventAsGanttChartFormat(dataGenStartTime)); - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie1_gantt_1node_flush_merge_rtree.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - dataGenStartTime = shbtree.getDataGenStartTimeStamp(); - ncLogReportBuilder = new NCLogReportBuilder(expHomePath + "SpatialIndexExperiment1" + sie1Type + "Shbtree/" - + logDirPrefix + "logs/a1_node1.log"); - sb.setLength(0); - sb.append(ncLogReportBuilder.getFlushMergeEventAsGanttChartFormat(dataGenStartTime)); - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie1_gantt_1node_flush_merge_shbtree.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - dataGenStartTime = sif.getDataGenStartTimeStamp(); - ncLogReportBuilder = new NCLogReportBuilder(expHomePath + "SpatialIndexExperiment1" + sie1Type + "Sif/" - + logDirPrefix + "logs/a1_node1.log"); - sb.setLength(0); - sb.append(ncLogReportBuilder.getFlushMergeEventAsGanttChartFormat(dataGenStartTime)); - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie1_gantt_1node_flush_merge_sif.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0e21afa7/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE2ReportBuilder.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE2ReportBuilder.java b/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE2ReportBuilder.java deleted file mode 100644 index 52034a4..0000000 --- a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE2ReportBuilder.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * 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.asterix.experiment.report; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; - -public class SIE2ReportBuilder extends AbstractDynamicDataEvalReportBuilder { - private static final int SELECT_QUERY_RADIUS_COUNT = 5; - private static final int INITIAL_SELECT_QUERY_COUNT_TO_IGNORE = 0; - private static final int MAX_SELECT_QUERY_COUNT_TO_CONSIDER = Integer.MAX_VALUE; //5000 + INITIAL_SELECT_QUERY_COUNT_TO_CONSIDER; - private static final int QUERY_GEN_COUNT = 8; - private static final String[] QUERY_GEN_IPS = { "130.149.249.61", "130.149.249.62", "130.149.249.63", - "130.149.249.64", "130.149.249.65", "130.149.249.66", "130.149.249.67", "130.149.249.68" }; - private BufferedReader[] queryLogFileBrs; - - public SIE2ReportBuilder(String expHomePath, String expName, String runLogFileName) { - super(expHomePath, expName, runLogFileName, false); - queryLogFileBrs = new BufferedReader[QUERY_GEN_COUNT]; - } - - @Override - public String getOverallInsertPS(int minutes) throws Exception { - return null; - } - - public String get20minInsertPS(int minutes) throws Exception { - renewStringBuilder(); - openRunLog(); - try { - if (!moveToExperimentBegin()) { - //The experiment run log doesn't exist in this run log file - return null; - } - - String line; - long insertCount = 0; - while ((line = br.readLine()) != null) { - if (line.contains("[During ingestion + queries][InsertCount]")) { - insertCount += ReportBuilderHelper.getLong(line, "=", "in"); - } - if (line.contains("Running")) { - break; - } - } - rsb.append(insertCount / (minutes * 60)); - return rsb.toString(); - } finally { - closeRunLog(); - } - } - - public double getFirstXminInsertPS(int minutes, int genId, int unitMinutes) throws Exception { - renewStringBuilder(); - openRunLog(); - try { - if (!moveToExperimentBegin()) { - //The experiment run log doesn't exist in this run log file - return 0; - } - - String line; - int dGenId; - int count = 0; - long timeToInsert = 0; - long totalTimeToInsert = 0; - boolean haveResult = false; - while ((line = br.readLine()) != null) { - if (line.contains("[During ingestion only][TimeToInsert100000]")) { - dGenId = ReportBuilderHelper.getInt(line, "DataGen[", "]"); - if (dGenId == genId) { - count++; - timeToInsert = ReportBuilderHelper.getLong(line, INSTANTANEOUS_INSERT_STRING, "in"); - totalTimeToInsert += timeToInsert; - if (totalTimeToInsert > minutes * 60000) { - haveResult = true; - break; - } - } - } - if (line.contains("Running")) { - break; - } - } - if (haveResult || totalTimeToInsert > (minutes * 60000 - unitMinutes * 60000)) { - return (count * INSTANTAEOUS_INSERT_COUNT) / ((double) totalTimeToInsert / 1000); - } else { - return 0; - //return ((count * INSTANTAEOUS_INSERT_COUNT) / ((double)totalTimeToInsert/1000)) * -1; - } - } finally { - closeRunLog(); - } - } - - @Override - public String getInstantaneousQueryPS() throws Exception { - return null; - } - - @Override - public String getQueryPS(int minutes) throws Exception { - renewStringBuilder(); - openRunLog(); - try { - if (!moveToExperimentBegin()) { - //The experiment run log doesn't exist in this run log file - return null; - } - - String line; - long queryCount = 0; - while ((line = br.readLine()) != null) { - if (line.contains("[QueryCount]")) { - queryCount += ReportBuilderHelper.getLong(line, "[QueryCount]", "in"); - } - if (line.contains("Running")) { - break; - } - } - rsb.append(queryCount / (float) (minutes * 60)); - return rsb.toString(); - } finally { - closeRunLog(); - } - } - - public String getAverageQueryResultCount() throws Exception { - renewStringBuilder(); - openQueryLog(); - try { - String line; - long resultCount = 0; - long queryCount = 0; - for (BufferedReader queryLogFileBr : queryLogFileBrs) { - while ((line = queryLogFileBr.readLine()) != null) { - if (line.contains("int64")) { - line = queryLogFileBr.readLine(); - resultCount += Long.parseLong(line); - ++queryCount; - } - } - } - rsb.append(resultCount / queryCount); - return rsb.toString(); - } finally { - closeQueryLog(); - } - } - - public String getAverageQueryResponseTime() throws Exception { - renewStringBuilder(); - openQueryLog(); - try { - String line; - long responseTime = 0; - long queryCount = 0; - for (BufferedReader queryLogFileBr : queryLogFileBrs) { - while ((line = queryLogFileBr.readLine()) != null) { - if (line.contains("Elapsed time = ")) { - responseTime += ReportBuilderHelper.getLong(line, "=", "for"); - ++queryCount; - } - } - } - rsb.append(responseTime / queryCount); - return rsb.toString(); - } finally { - closeQueryLog(); - } - } - - public String getSelectQueryResponseTime(int radiusIdx) throws Exception { - renewStringBuilder(); - openQueryLog(); - try { - String line; - long queryResponseTime = 0; - int targetRadiusSelectQueryCount = 0; - for (BufferedReader queryLogFileBr : queryLogFileBrs) { - int selectQueryCount = 0; - while ((line = queryLogFileBr.readLine()) != null) { - if (line.contains("Elapsed time =") && selectQueryCount < MAX_SELECT_QUERY_COUNT_TO_CONSIDER) { - if (selectQueryCount % SELECT_QUERY_RADIUS_COUNT == radiusIdx - && selectQueryCount >= INITIAL_SELECT_QUERY_COUNT_TO_IGNORE) { - queryResponseTime += ReportBuilderHelper.getLong(line, "=", "for"); - ++targetRadiusSelectQueryCount; - } - ++selectQueryCount; - } - } - } - rsb.append((double) queryResponseTime / targetRadiusSelectQueryCount); - return rsb.toString(); - } finally { - closeQueryLog(); - } - } - - public String getSelectQueryResultCount(int radiusIdx) throws Exception { - renewStringBuilder(); - openQueryLog(); - try { - String line; - long queryResultCount = 0; - int targetRadiusSelectQueryCount = 0; - for (BufferedReader queryLogFileBr : queryLogFileBrs) { - int selectQueryCount = 0; - while ((line = queryLogFileBr.readLine()) != null) { - if (line.contains("int64") && selectQueryCount < MAX_SELECT_QUERY_COUNT_TO_CONSIDER) { - if (selectQueryCount % SELECT_QUERY_RADIUS_COUNT == radiusIdx - && selectQueryCount >= INITIAL_SELECT_QUERY_COUNT_TO_IGNORE) { - line = queryLogFileBr.readLine(); //read the result count line - queryResultCount += Long.parseLong(line); - ++targetRadiusSelectQueryCount; - } - ++selectQueryCount; - } - } - } - rsb.append((double) queryResultCount / targetRadiusSelectQueryCount); - return rsb.toString(); - } finally { - closeQueryLog(); - } - } - - private void openQueryLog() throws IOException { - String queryLogFilePathPrefix = expHomePath + File.separator + expName + File.separator + "QueryGenResult-"; - String queryLogFilePathSuffix = ".txt"; - for (int i = 0; i < QUERY_GEN_COUNT; i++) { - queryLogFileBrs[i] = new BufferedReader(new FileReader(queryLogFilePathPrefix + QUERY_GEN_IPS[i] - + queryLogFilePathSuffix)); - } - } - - private void closeQueryLog() throws IOException { - for (BufferedReader queryLogFileBr : queryLogFileBrs) { - if (queryLogFileBr != null) { - queryLogFileBr.close(); - queryLogFileBr = null; - } - } - } -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0e21afa7/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE2ReportBuilderRunner.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE2ReportBuilderRunner.java b/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE2ReportBuilderRunner.java deleted file mode 100644 index 91f30f5..0000000 --- a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE2ReportBuilderRunner.java +++ /dev/null @@ -1,459 +0,0 @@ -/* - * 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.asterix.experiment.report; - -import java.io.FileOutputStream; -import java.util.ArrayList; - -public class SIE2ReportBuilderRunner { - String expHomePath = "/Users/kisskys/workspace/asterix_master/resultLog/MemBuf3g-DiskBuf3g-Lsev-Jvm7g-Lock0g/exp2-4/"; - String runLogFileName = "run-exp2-4.log"; - String outputFilePath = "/Users/kisskys/workspace/asterix_master/resultLog/MemBuf3g-DiskBuf3g-Lsev-Jvm7g-Lock0g/result-report/"; - - SIE2ReportBuilder sie2Dhbtree = new SIE2ReportBuilder(expHomePath, "SpatialIndexExperiment2Dhbtree", runLogFileName); - SIE2ReportBuilder sie2Dhvbtree = new SIE2ReportBuilder(expHomePath, "SpatialIndexExperiment2Dhvbtree", - runLogFileName); - SIE2ReportBuilder sie2Rtree = new SIE2ReportBuilder(expHomePath, "SpatialIndexExperiment2Rtree", runLogFileName); - SIE2ReportBuilder sie2Shbtree = new SIE2ReportBuilder(expHomePath, "SpatialIndexExperiment2Shbtree", runLogFileName); - SIE2ReportBuilder sie2Sif = new SIE2ReportBuilder(expHomePath, "SpatialIndexExperiment2Sif", runLogFileName); - - StringBuilder sb = new StringBuilder(); - - /** - * generate sie2_overall_insert_ps.txt - */ - public void generateOverallInsertPS() throws Exception { - int targetRound = 721; //(3600 seconds / 5seconds) + 1 - - ArrayList<Long> ipsListDhbtree = new ArrayList<Long>(); - ArrayList<Long> ipsListDhvbtree = new ArrayList<Long>(); - ArrayList<Long> ipsListRtree = new ArrayList<Long>(); - ArrayList<Long> ipsListShbtree = new ArrayList<Long>(); - ArrayList<Long> ipsListSif = new ArrayList<Long>(); - sie2Dhbtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListDhbtree); - sie2Dhvbtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListDhvbtree); - sie2Rtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListRtree); - sie2Shbtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListShbtree); - sie2Sif.getAllNodesAccumulatedInsertPS(targetRound, ipsListSif); - - sb.setLength(0); - sb.append("# sie2 60min inserts per second report\n"); - sb.append("index type, InsertPS\n"); - sb.append("dhbtree,").append(ipsListDhbtree.get(targetRound - 1)).append("\n"); - sb.append("dhvbtree,").append(ipsListDhvbtree.get(targetRound - 1)).append("\n"); - sb.append("rtree,").append(ipsListRtree.get(targetRound - 1)).append("\n"); - sb.append("shbtree,").append(ipsListShbtree.get(targetRound - 1)).append("\n"); - sb.append("sif,").append(ipsListSif.get(targetRound - 1)).append("\n"); - - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie2_overall_insert_ps.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - ipsListDhbtree.clear(); - ipsListDhvbtree.clear(); - ipsListRtree.clear(); - ipsListShbtree.clear(); - ipsListSif.clear(); - } - - /** - * generate sie2_accumulated_insert_ps.txt - */ - public void generateAccumulatedInsertPS() throws Exception { - int targetRound = 721; //(3600 seconds / 5seconds) + 1 - int roundInterval = 5; - - ArrayList<Long> ipsListDhbtree = new ArrayList<Long>(); - ArrayList<Long> ipsListDhvbtree = new ArrayList<Long>(); - ArrayList<Long> ipsListRtree = new ArrayList<Long>(); - ArrayList<Long> ipsListShbtree = new ArrayList<Long>(); - ArrayList<Long> ipsListSif = new ArrayList<Long>(); - sie2Dhbtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListDhbtree); - sie2Dhvbtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListDhvbtree); - sie2Rtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListRtree); - sie2Shbtree.getAllNodesAccumulatedInsertPS(targetRound, ipsListShbtree); - sie2Sif.getAllNodesAccumulatedInsertPS(targetRound, ipsListSif); - - sb.setLength(0); - sb.append("# sie2 accumulated inserts per second report\n"); - sb.append("# time, dhbtree, dhvbtree, rtree, shbtree, sif\n"); - - for (int i = 0; i < targetRound; i++) { - sb.append("" + (i * roundInterval) + "," + ipsListDhbtree.get(i) + "," + ipsListDhvbtree.get(i) + "," - + ipsListRtree.get(i) + "," + ipsListShbtree.get(i) + "," + ipsListSif.get(i) + "\n"); - } - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie2_accumulated_insert_ps.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - ipsListDhbtree.clear(); - ipsListDhvbtree.clear(); - ipsListRtree.clear(); - ipsListShbtree.clear(); - ipsListSif.clear(); - } - - public void generateQueryPS() throws Exception { - int minutes = 60; - sb.setLength(0); - sb.append("# sie2 queries per second report\n"); - sb.append("index type, QueryPS\n"); - sb.append("dhbtree,").append(sie2Dhbtree.getQueryPS(minutes)).append("\n"); - sb.append("dhvbtree,").append(sie2Dhvbtree.getQueryPS(minutes)).append("\n"); - sb.append("rtree,").append(sie2Rtree.getQueryPS(minutes)).append("\n"); - sb.append("shbtree,").append(sie2Shbtree.getQueryPS(minutes)).append("\n"); - sb.append("sif,").append(sie2Sif.getQueryPS(minutes)).append("\n"); - - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie2_query_ps.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - - public void generateAverageQueryResultCount() throws Exception { - sb.setLength(0); - sb.append("# sie2 average query result count report\n"); - sb.append("index type, query result count\n"); - sb.append("dhbtree,").append(sie2Dhbtree.getAverageQueryResultCount()).append("\n"); - sb.append("dhvbtree,").append(sie2Dhvbtree.getAverageQueryResultCount()).append("\n"); - sb.append("rtree,").append(sie2Rtree.getAverageQueryResultCount()).append("\n"); - sb.append("shbtree,").append(sie2Shbtree.getAverageQueryResultCount()).append("\n"); - sb.append("sif,").append(sie2Sif.getAverageQueryResultCount()).append("\n"); - - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_average_query_result_count.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - - public void generateAverageQueryResponseTime() throws Exception { - sb.setLength(0); - sb.append("# sie2 average query response time report\n"); - sb.append("index type, query response time\n"); - sb.append("dhbtree,").append(sie2Dhbtree.getAverageQueryResponseTime()).append("\n"); - sb.append("dhvbtree,").append(sie2Dhvbtree.getAverageQueryResponseTime()).append("\n"); - sb.append("rtree,").append(sie2Rtree.getAverageQueryResponseTime()).append("\n"); - sb.append("shbtree,").append(sie2Shbtree.getAverageQueryResponseTime()).append("\n"); - sb.append("sif,").append(sie2Sif.getAverageQueryResponseTime()).append("\n"); - - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_average_query_response_time.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - - public void generateInstantaneousInsertPS() throws Exception { - for (int i = 0; i < 8; i++) { - sb.setLength(0); - sb.append("# sie2 instantaneous inserts per second report\n"); - sb.append(sie2Dhbtree.getInstantaneousInsertPS(i, false)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_instantaneous_insert_ps_dhbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 8; i++) { - sb.setLength(0); - sb.append("# sie2 instantaneous inserts per second report\n"); - sb.append(sie2Dhvbtree.getInstantaneousInsertPS(i, false)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_instantaneous_insert_ps_dhvbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 8; i++) { - sb.setLength(0); - sb.append("# sie2 instantaneous inserts per second report\n"); - sb.append(sie2Rtree.getInstantaneousInsertPS(i, false)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_instantaneous_insert_ps_rtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 8; i++) { - sb.setLength(0); - sb.append("# sie2 instantaneous inserts per second report\n"); - sb.append(sie2Shbtree.getInstantaneousInsertPS(i, false)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_instantaneous_insert_ps_shbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 8; i++) { - sb.setLength(0); - sb.append("# sie2 instantaneous inserts per second report\n"); - sb.append(sie2Sif.getInstantaneousInsertPS(i, false)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_instantaneous_insert_ps_sif_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - } - - public void generateGanttInstantaneousInsertPS() throws Exception { - for (int i = 0; i < 1; i++) { - sb.setLength(0); - sb.append("# sie2 8nodes(8 dataGen) instantaneous inserts per second report\n"); - sb.append(sie2Dhbtree.getInstantaneousInsertPS(i, true)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_gantt_1node_instantaneous_insert_ps_dhbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 1; i++) { - sb.setLength(0); - sb.append("# sie2 8nodes(8 dataGen) instantaneous inserts per second report\n"); - sb.append(sie2Dhvbtree.getInstantaneousInsertPS(i, true)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_gantt_1node_instantaneous_insert_ps_dhvbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 1; i++) { - sb.setLength(0); - sb.append("# sie2 8nodes(8 dataGen) instantaneous inserts per second report\n"); - sb.append(sie2Rtree.getInstantaneousInsertPS(i, true)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_gantt_1node_instantaneous_insert_ps_rtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 1; i++) { - sb.setLength(0); - sb.append("# sie2 8nodes(8 dataGen) instantaneous inserts per second report\n"); - sb.append(sie2Shbtree.getInstantaneousInsertPS(i, true)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_gantt_1node_instantaneous_insert_ps_shbtree_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - for (int i = 0; i < 1; i++) { - sb.setLength(0); - sb.append("# sie2 8nodes(8 dataGen) instantaneous inserts per second report\n"); - sb.append(sie2Sif.getInstantaneousInsertPS(i, true)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_gantt_1node_instantaneous_insert_ps_sif_gen" + i + ".txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - - long dataGenStartTime = sie2Dhbtree.getDataGenStartTimeStamp(); - NCLogReportBuilder ncLogReportBuilder = new NCLogReportBuilder(expHomePath - + "SpatialIndexExperiment2Dhbtree/logs/a1_node1.log"); - sb.setLength(0); - sb.append(ncLogReportBuilder.getFlushMergeEventAsGanttChartFormat(dataGenStartTime)); - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_gantt_1node_flush_merge_dhbtree.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - dataGenStartTime = sie2Dhvbtree.getDataGenStartTimeStamp(); - ncLogReportBuilder = new NCLogReportBuilder(expHomePath + "SpatialIndexExperiment2Dhvbtree/logs/a1_node1.log"); - sb.setLength(0); - sb.append(ncLogReportBuilder.getFlushMergeEventAsGanttChartFormat(dataGenStartTime)); - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie2_gantt_1node_flush_merge_dhvbtree.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - dataGenStartTime = sie2Rtree.getDataGenStartTimeStamp(); - ncLogReportBuilder = new NCLogReportBuilder(expHomePath + "SpatialIndexExperiment2Rtree/logs/a1_node1.log"); - sb.setLength(0); - sb.append(ncLogReportBuilder.getFlushMergeEventAsGanttChartFormat(dataGenStartTime)); - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie2_gantt_1node_flush_merge_rtree.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - dataGenStartTime = sie2Shbtree.getDataGenStartTimeStamp(); - ncLogReportBuilder = new NCLogReportBuilder(expHomePath + "SpatialIndexExperiment2Shbtree/logs/a1_node1.log"); - sb.setLength(0); - sb.append(ncLogReportBuilder.getFlushMergeEventAsGanttChartFormat(dataGenStartTime)); - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie2_gantt_1node_flush_merge_shbtree.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - dataGenStartTime = sie2Sif.getDataGenStartTimeStamp(); - ncLogReportBuilder = new NCLogReportBuilder(expHomePath + "SpatialIndexExperiment2Sif/logs/a1_node1.log"); - sb.setLength(0); - sb.append(ncLogReportBuilder.getFlushMergeEventAsGanttChartFormat(dataGenStartTime)); - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie2_gantt_1node_flush_merge_sif.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - - public void generateSelectQueryResponseTime() throws Exception { - sb.setLength(0); - sb.append("# sie2 select query response time report\n"); - - sb.append("radius, dhbtree, dhvbtree, rtree, shbtree, sif\n"); - sb.append("0.00001,").append(sie2Dhbtree.getSelectQueryResponseTime(0)).append(",") - .append(sie2Dhvbtree.getSelectQueryResponseTime(0)).append(",") - .append(sie2Rtree.getSelectQueryResponseTime(0)).append(",") - .append(sie2Shbtree.getSelectQueryResponseTime(0)).append(",") - .append(sie2Sif.getSelectQueryResponseTime(0)).append("\n"); - sb.append("0.0001,").append(sie2Dhbtree.getSelectQueryResponseTime(1)).append(",") - .append(sie2Dhvbtree.getSelectQueryResponseTime(1)).append(",") - .append(sie2Rtree.getSelectQueryResponseTime(1)).append(",") - .append(sie2Shbtree.getSelectQueryResponseTime(1)).append(",") - .append(sie2Sif.getSelectQueryResponseTime(1)).append("\n"); - sb.append("0.001,").append(sie2Dhbtree.getSelectQueryResponseTime(2)).append(",") - .append(sie2Dhvbtree.getSelectQueryResponseTime(2)).append(",") - .append(sie2Rtree.getSelectQueryResponseTime(2)).append(",") - .append(sie2Shbtree.getSelectQueryResponseTime(2)).append(",") - .append(sie2Sif.getSelectQueryResponseTime(2)).append("\n"); - sb.append("0.01,").append(sie2Dhbtree.getSelectQueryResponseTime(3)).append(",") - .append(sie2Dhvbtree.getSelectQueryResponseTime(3)).append(",") - .append(sie2Rtree.getSelectQueryResponseTime(3)).append(",") - .append(sie2Shbtree.getSelectQueryResponseTime(3)).append(",") - .append(sie2Sif.getSelectQueryResponseTime(3)).append("\n"); - sb.append("0.1,").append(sie2Dhbtree.getSelectQueryResponseTime(4)).append(",") - .append(sie2Dhvbtree.getSelectQueryResponseTime(4)).append(",") - .append(sie2Rtree.getSelectQueryResponseTime(4)).append(",") - .append(sie2Shbtree.getSelectQueryResponseTime(4)).append(",") - .append(sie2Sif.getSelectQueryResponseTime(4)).append("\n"); - - FileOutputStream fos = ReportBuilderHelper.openOutputFile(outputFilePath - + "sie2_select_query_response_time.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - sb.setLength(0); - sb.append("# sie2 select query response time report\n"); - - sb.append("radius, dhbtree, dhvbtree, rtree, shbtree, sif\n"); - sb.append("0.00001,").append(sie2Dhbtree.getSelectQueryResponseTime(0)).append(",") - .append(sie2Dhvbtree.getSelectQueryResponseTime(0)).append(",") - .append(sie2Rtree.getSelectQueryResponseTime(0)).append(",") - .append(sie2Shbtree.getSelectQueryResponseTime(0)).append(",") - .append(sie2Sif.getSelectQueryResponseTime(0)).append("\n"); - sb.append("0.0001,").append(sie2Dhbtree.getSelectQueryResponseTime(1)).append(",") - .append(sie2Dhvbtree.getSelectQueryResponseTime(1)).append(",") - .append(sie2Rtree.getSelectQueryResponseTime(1)).append(",") - .append(sie2Shbtree.getSelectQueryResponseTime(1)).append(",") - .append(sie2Sif.getSelectQueryResponseTime(1)).append("\n"); - sb.append("0.001,").append(sie2Dhbtree.getSelectQueryResponseTime(2)).append(",") - .append(sie2Dhvbtree.getSelectQueryResponseTime(2)).append(",") - .append(sie2Rtree.getSelectQueryResponseTime(2)).append(",") - .append(sie2Shbtree.getSelectQueryResponseTime(2)).append(",") - .append(sie2Sif.getSelectQueryResponseTime(2)).append("\n"); - - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie2_select_query_response_time1.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - sb.setLength(0); - sb.append("# sie2 select query response time 2 report\n"); - - sb.append("radius, dhbtree, dhvbtree, rtree, shbtree, sif\n"); - sb.append("0.01,").append(sie2Dhbtree.getSelectQueryResponseTime(3)).append(",") - .append(sie2Dhvbtree.getSelectQueryResponseTime(3)).append(",") - .append(sie2Rtree.getSelectQueryResponseTime(3)).append(",") - .append(sie2Shbtree.getSelectQueryResponseTime(3)).append(",") - .append(sie2Sif.getSelectQueryResponseTime(3)).append("\n"); - sb.append("0.1,").append(sie2Dhbtree.getSelectQueryResponseTime(4)).append(",") - .append(sie2Dhvbtree.getSelectQueryResponseTime(4)).append(",") - .append(sie2Rtree.getSelectQueryResponseTime(4)).append(",") - .append(sie2Shbtree.getSelectQueryResponseTime(4)).append(",") - .append(sie2Sif.getSelectQueryResponseTime(4)).append("\n"); - - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie2_select_query_response_time2.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } - - public void generateSelectQueryResultCount() throws Exception { - - sb.setLength(0); - sb.append("# sie2 select query result count report\n"); - - sb.append("radius, dhbtree, dhvbtree, rtree, shbtree, sif\n"); - sb.append("0.00001,").append(sie2Dhbtree.getSelectQueryResultCount(0)).append(",") - .append(sie2Dhvbtree.getSelectQueryResultCount(0)).append(",") - .append(sie2Rtree.getSelectQueryResultCount(0)).append(",") - .append(sie2Shbtree.getSelectQueryResultCount(0)).append(",") - .append(sie2Sif.getSelectQueryResultCount(0)).append("\n"); - sb.append("0.0001,").append(sie2Dhbtree.getSelectQueryResultCount(1)).append(",") - .append(sie2Dhvbtree.getSelectQueryResultCount(1)).append(",") - .append(sie2Rtree.getSelectQueryResultCount(1)).append(",") - .append(sie2Shbtree.getSelectQueryResultCount(1)).append(",") - .append(sie2Sif.getSelectQueryResultCount(1)).append("\n"); - sb.append("0.001,").append(sie2Dhbtree.getSelectQueryResultCount(2)).append(",") - .append(sie2Dhvbtree.getSelectQueryResultCount(2)).append(",") - .append(sie2Rtree.getSelectQueryResultCount(2)).append(",") - .append(sie2Shbtree.getSelectQueryResultCount(2)).append(",") - .append(sie2Sif.getSelectQueryResultCount(2)).append("\n"); - sb.append("0.01,").append(sie2Dhbtree.getSelectQueryResultCount(3)).append(",") - .append(sie2Dhvbtree.getSelectQueryResultCount(3)).append(",") - .append(sie2Rtree.getSelectQueryResultCount(3)).append(",") - .append(sie2Shbtree.getSelectQueryResultCount(3)).append(",") - .append(sie2Sif.getSelectQueryResultCount(3)).append("\n"); - sb.append("0.1,").append(sie2Dhbtree.getSelectQueryResultCount(4)).append(",") - .append(sie2Dhvbtree.getSelectQueryResultCount(4)).append(",") - .append(sie2Rtree.getSelectQueryResultCount(4)).append(",") - .append(sie2Shbtree.getSelectQueryResultCount(4)).append(",") - .append(sie2Sif.getSelectQueryResultCount(4)).append("\n"); - - FileOutputStream fos = ReportBuilderHelper - .openOutputFile(outputFilePath + "sie2_select_query_result_count.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - sb.setLength(0); - sb.append("# sie2 select query result count 1 report\n"); - - sb.append("radius, dhbtree, dhvbtree, rtree, shbtree, sif\n"); - sb.append("0.00001,").append(sie2Dhbtree.getSelectQueryResultCount(0)).append(",") - .append(sie2Dhvbtree.getSelectQueryResultCount(0)).append(",") - .append(sie2Rtree.getSelectQueryResultCount(0)).append(",") - .append(sie2Shbtree.getSelectQueryResultCount(0)).append(",") - .append(sie2Sif.getSelectQueryResultCount(0)).append("\n"); - sb.append("0.0001,").append(sie2Dhbtree.getSelectQueryResultCount(1)).append(",") - .append(sie2Dhvbtree.getSelectQueryResultCount(1)).append(",") - .append(sie2Rtree.getSelectQueryResultCount(1)).append(",") - .append(sie2Shbtree.getSelectQueryResultCount(1)).append(",") - .append(sie2Sif.getSelectQueryResultCount(1)).append("\n"); - sb.append("0.001,").append(sie2Dhbtree.getSelectQueryResultCount(2)).append(",") - .append(sie2Dhvbtree.getSelectQueryResultCount(2)).append(",") - .append(sie2Rtree.getSelectQueryResultCount(2)).append(",") - .append(sie2Shbtree.getSelectQueryResultCount(2)).append(",") - .append(sie2Sif.getSelectQueryResultCount(2)).append("\n"); - - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie2_select_query_result_count1.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - - sb.setLength(0); - sb.append("# sie2 select query result count 2 report\n"); - - sb.append("radius, dhbtree, dhvbtree, rtree, shbtree, sif\n"); - sb.append("0.01,").append(sie2Dhbtree.getSelectQueryResultCount(3)).append(",") - .append(sie2Dhvbtree.getSelectQueryResultCount(3)).append(",") - .append(sie2Rtree.getSelectQueryResultCount(3)).append(",") - .append(sie2Shbtree.getSelectQueryResultCount(3)).append(",") - .append(sie2Sif.getSelectQueryResultCount(3)).append("\n"); - sb.append("0.1,").append(sie2Dhbtree.getSelectQueryResultCount(4)).append(",") - .append(sie2Dhvbtree.getSelectQueryResultCount(4)).append(",") - .append(sie2Rtree.getSelectQueryResultCount(4)).append(",") - .append(sie2Shbtree.getSelectQueryResultCount(4)).append(",") - .append(sie2Sif.getSelectQueryResultCount(4)).append("\n"); - - fos = ReportBuilderHelper.openOutputFile(outputFilePath + "sie2_select_query_result_count2.txt"); - fos.write(sb.toString().getBytes()); - ReportBuilderHelper.closeOutputFile(fos); - } -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0e21afa7/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE3ProfileReportBuilder.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE3ProfileReportBuilder.java b/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE3ProfileReportBuilder.java deleted file mode 100644 index 138afb4..0000000 --- a/asterixdb/asterix-experiments/src/main/java/org/apache/asterix/experiment/report/SIE3ProfileReportBuilder.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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.asterix.experiment.report; - -public class SIE3ProfileReportBuilder extends AbstractDynamicDataEvalReportBuilder { - public SIE3ProfileReportBuilder(String expHomePath, String expName, String runLogFileName) { - super(expHomePath, expName, runLogFileName, false); - } - - @Override - public String getOverallInsertPS(int minutes) throws Exception { - renewStringBuilder(); - openRunLog(); - try { - if (!moveToExperimentBegin()) { - //The experiment run log doesn't exist in this run log file - return null; - } - - String line; - while ((line = br.readLine()) != null) { - if (line.contains("int64")) { - line = br.readLine(); - rsb.append(Long.parseLong(line) / (minutes * 60)); - break; - } - } - - return rsb.toString(); - } finally { - closeRunLog(); - } - } - - @Override - public String getInstantaneousQueryPS() throws Exception { - return null; - } - - @Override - public String getQueryPS(int minutes) throws Exception { - return null; - // renewStringBuilder(); - // openRunLog(); - // try { - // - // return getResult(); - // } finally { - // closeRunLog(); - // } - } -}
