Skip to content

Commit

Permalink
Revert "Dumping of Per driver results #221"
Browse files Browse the repository at this point in the history
This reverts commit fcd3f30.
  • Loading branch information
liyuanwa committed Jan 22, 2015
1 parent fcd3f30 commit ccd1dbf
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 263 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@
package com.intel.cosbench.controller.archiver;

import java.io.*;
import java.util.List;
import java.util.Scanner;

import com.intel.cosbench.bench.Metrics;
import com.intel.cosbench.bench.TaskReport;
import com.intel.cosbench.config.*;
import com.intel.cosbench.config.castor.CastorConfigTools;
import com.intel.cosbench.exporter.*;
Expand Down Expand Up @@ -92,28 +89,9 @@ private void doArchive(WorkloadInfo info, File runDir) throws IOException {
exportConfig(info.getWorkload(), runDir);
exportLog(info, runDir);
exportScriptsLog(info, runDir);
exportPerformanceMatrix(info);
exportTaskInfo(info,runDir);
exportPerformanceMatrix(info);
}

private void exportTaskInfo(WorkloadInfo info,File parent)throws IOException{
for(DriverInfo dInfo:info.getDriverInfos()){
File file = new File(parent, dInfo.getName() + ".csv");
Writer writer = new BufferedWriter(new FileWriter(file));
TaskExporter exporter = Exporters.newTaskExporter(info,dInfo);
try {
exporter.export(writer);
} finally {
writer.close();
}
String name = dInfo.getName();
String path = file.getAbsolutePath();
String msg = "perf details of {} has been exported to {}";
LOGGER.debug(msg, name, path);
}
}


private static String getRunDirName(WorkloadInfo info) {
String name = info.getId();
name += '-' + info.getWorkload().getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,8 @@ public class StageContext implements StageInfo {
private volatile Report report = null; // will be merged from task reports

private transient List<StageListener> listeners = new ArrayList<StageListener>();

private List<TaskReport> taskReports = new ArrayList<TaskReport>();

public List<TaskReport> getTaskReports() {
return taskReports;
}

public void setTaskReports(List<TaskReport> taskReports) {
this.taskReports = taskReports;
}

public StageContext() {
public StageContext() {
/* empty */
}

Expand Down Expand Up @@ -103,14 +93,8 @@ public Report mergeReport() {
if (taskRegistry == null)
return new Report();
ReportMerger merger = new ReportMerger();
for (TaskContext task : taskRegistry){
TaskReport tReport=new TaskReport();
tReport.setReport(task.getReport());
tReport.setDriverName(task.getSchedule().getDriver().getName());
tReport.setDriverUrl(task.getSchedule().getDriver().getUrl());
taskReports.add(tReport);
merger.add(task.getReport());
}
for (TaskContext task : taskRegistry)
merger.add(task.getReport());
return merger.merge();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@

import com.intel.cosbench.bench.*;
import com.intel.cosbench.config.*;
import com.intel.cosbench.log.LogFactory;
import com.intel.cosbench.log.Logger;
import com.intel.cosbench.model.*;

public class WorkloadContext implements WorkloadInfo {

private static final Logger LOGGER = LogFactory.getSystemLogger();
private String id;
private Date submitDate;
private Date startDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

import com.intel.cosbench.controller.model.WorkloadContext;

interface WorkloadList
{
interface WorkloadList {

public int count();

Expand Down
11 changes: 0 additions & 11 deletions dev/cosbench-core/src/com/intel/cosbench/bench/Metrics.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,4 @@ public static Metrics convert(Mark mark, long window) {
return metrics;
}

@Override
public String toString() {
return "Metrics [name=" + name + ", opType=" + opType + ", sampleType="
+ sampleType + ", opName=" + opName + ", opId=" + opId
+ ", sampleCount=" + sampleCount + ", totalSampleCount="
+ totalSampleCount + ", byteCount=" + byteCount
+ ", workerCount=" + workerCount + ", avgResTime=" + avgResTime
+ ", avgXferTime=" + avgXferTime + ", throughput=" + throughput
+ ", bandwidth=" + bandwidth + ", latency=" + latency
+ ", ratio=" + ratio + "]";
}
}
1 change: 0 additions & 1 deletion dev/cosbench-core/src/com/intel/cosbench/bench/Report.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ public Metrics getMetrics(String name) {
public Metrics[] getAllMetrics() {
return getAllItems().toArray(new Metrics[getSize()]);
}


}
31 changes: 0 additions & 31 deletions dev/cosbench-core/src/com/intel/cosbench/bench/TaskReport.java

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 1 addition & 11 deletions dev/cosbench-core/src/com/intel/cosbench/exporter/Exporters.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,15 @@

package com.intel.cosbench.exporter;

import com.intel.cosbench.bench.TaskReport;
import com.intel.cosbench.model.*;

/**
* This class is a wrapper to construct different exporters by providing static construction methods.
*
* @author ywang19, qzheng7
* @author ywang19, qzheng7
*
*/
public class Exporters {

public static TaskExporter newTaskExporter(WorkloadInfo workloadInfo,DriverInfo driverInfo){
AbstractTaskExporter exporter = new CSVTaskExporter();
exporter.setWorkloadInfo(workloadInfo);
exporter.setDriverInfo(driverInfo);
return exporter;
}

public static RunExporter newRunExporter(WorkloadInfo workload) {
AbstractRunExporter exporter = new CSVRunExporter();
Expand Down Expand Up @@ -76,7 +68,5 @@ public static MatrixExporter newMatrixExporter(WorkloadInfo workload) {
exporter.setWorkload(workload);
return exporter;
}



}

This file was deleted.

5 changes: 0 additions & 5 deletions dev/cosbench-core/src/com/intel/cosbench/model/StageInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package com.intel.cosbench.model;

import java.util.Date;
import java.util.List;
import java.util.Set;

import com.intel.cosbench.bench.*;
Expand Down Expand Up @@ -58,9 +57,5 @@ public interface StageInfo extends LifeCycle, Benchmark {
public void setReport(Report report);

public ListRegistry<Snapshot> getSnapshotRegistry();

public List<TaskReport> getTaskReports();

public void setTaskReports(List<TaskReport> taskReports);

}

0 comments on commit ccd1dbf

Please sign in to comment.