-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_analysis_err.m
More file actions
108 lines (93 loc) · 3.2 KB
/
Copy pathplot_analysis_err.m
File metadata and controls
108 lines (93 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
addpath('matlab_func');
common_settings;
is_printed = 0;
EXTRA='';
%%
barWidth = 0.5;
queue_num = 10;
cluster_size=20;
figureSize = figSizeThreeFourth;
plots = [false true];
% files = {'DRF', 'ES', 'AlloX'};
% speedups = [0.1, 0.5, 1.0]
errs = 0:0.1:0.6;
files = {'DRFFIFO','DRF', 'ES', 'DRFExt', 'AlloX', 'SRPT'};
methods = {'DRFF', strDRFSJF, strES, strDRFExt, strAlloX, strSRPT};
lines = {lineDRFFIFO, lineDRFSJF, lineES, lineDRFExt,lineAlloX, lineSRPT};
colors = {colorDRFFIFO, colorDRFSJF, colorES, colorDRFExt,colorAlloX, colorSRPT};
DRFFIFOId = 1; DRFId=2; ESId = 3; DRFExtId = 4; AlloXId = 5; SRPTId=6;
% vsMethods = [DRFFIFOId, DRFId, ESId, DRFExtId, SRPTId];
vsMethods = [ESId, AlloXId, SRPTId];
%% load data
resVals = ones(length(files),length(errs));
for i=1:length(files)
for j=1:length(errs)
extraStr = ['_' int2str(queue_num) '_' int2str(cluster_size) '_e' sprintf('%1.1f',errs(j))];
outputFile = [ 'output/' files{i} '-output' extraStr '.csv'];
[JobIds, startTimes, endTimes, durations, queueNames] = import_compl_time_real_job(outputFile);
if(~isnan(durations))
resVals(i,j) = mean(durations);
end
end
end
%%
if plots(1)
figIdx=figIdx +1;
figures{figIdx} = figure;
scrsz = get(groot, 'ScreenSize');
hold on;
legendStr={};
for i=1:length(vsMethods)
idx = vsMethods(i);
yValues = (resVals(idx,:)-resVals(AlloXId,:))./resVals(idx,:) * 100;
plot(errs*100, yValues , 'LineWidth', lineWidth);
legendStr{i}=['vs.' methods(idx)];
end
hold off;
xLabel=strErrorStd;
yLabel='improvement (%)';
% ylim([min(min(min(yValues)),0) max(max(yValues))]);
% ylim([0 0.4]);
set (gcf, 'Units', 'Inches', 'Position', figureSize, 'PaperUnits', 'inches', 'PaperPosition', figureSize);
% xlabel(xLabel,'FontSize',fontAxis);
ylabel(yLabel,'FontSize', fontAxis);
xlabel(xLabel,'FontSize', fontAxis);
fileNames{figIdx} = 'analysis_err_im';
end
%%
if plots(2)
figIdx=figIdx +1;
figures{figIdx} = figure;
scrsz = get(groot, 'ScreenSize');
hold on;
strLegend = {};
for i=1:length(vsMethods)
iMethod = vsMethods(i);
plot(errs*100, resVals(iMethod,:),lines{iMethod}, 'Color', colors{iMethod}, 'LineWidth', lineWidth);
strLegend{i} = methods{iMethod};
end
hold off;
legend(strLegend, 'Location','west','FontSize', fontLegend);
xLabel=strErrorStd;
yLabel=strAvgCmplt;
box off;
% ylim([min(min(min(yValues)),0) max(max(yValues))]);
% ylim([0 0.4]);
set (gcf, 'Units', 'Inches', 'Position', figureSize .*[1 1 1 1], 'PaperUnits', 'inches', 'PaperPosition', figureSize .*[1 1 1 1]);
% xlabel(xLabel,'FontSize',fontAxis);
ylabel(yLabel,'FontSize', fontAxis);
xlabel(xLabel,'FontSize', fontAxis);
fileNames{figIdx} = 'analysis_err';
end
%%
return;
%%
extra='';
for i=1:length(fileNames)
fileName = fileNames{i};
epsFile = [ LOCAL_FIG fileName '.eps'];
print (figures{i}, '-depsc', epsFile);
pdfFile = [ fig_path fileName EXTRA '.pdf']
cmd = sprintf(PS_CMD_FORMAT, epsFile, pdfFile);
status = system(cmd);
end