-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotAnalysis.m
More file actions
103 lines (86 loc) · 3.35 KB
/
Copy pathplotAnalysis.m
File metadata and controls
103 lines (86 loc) · 3.35 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
addpath('matlab_func');
common_settings;
%%
queue_num = 4;
plots = [true];
cluster_size = 100;
END_TIME = 10;
largeStr='_analysis_';
queue_num=4;
outputExtra = '';
colorUsers = {colorUser1; colorUser2; colorUser3; colorUser4};
result_folder = '';
output_folder = [result_folder 'output/'];
%%
betas =[0.5 1.0 5 25.0 50.0 100.0];
methods = {strES, strDRF, strFDRF, strMP, strMSR, strPricing};
QUEUES = {'queue0', 'queue1', 'queue2', 'queue3'};
jobCompleted = ones(length(betas), length(methods));
performanceGains = ones(length(betas), length(methods));
for b=1:length(betas)
str = num2str(betas(b));
if(betas(b)>=1)
str = [num2str(betas(b)) '.0'];
end
largeStr= ['_analysis_' str];
files = {
['ES-output_' num2str(queue_num) '_' num2str(cluster_size) largeStr '.csv'];
['DRF-output_' num2str(queue_num) '_' num2str(cluster_size) largeStr '.csv'];
['FDRF-output_' num2str(queue_num) '_' num2str(cluster_size) largeStr '.csv'];
['MaxMinMem-output_' num2str(queue_num) '_' num2str(cluster_size) largeStr '.csv'];
['SpeedUp-output_' num2str(queue_num) '_' num2str(cluster_size) largeStr '.csv'];
['Pricing-output_' num2str(queue_num) '_' num2str(cluster_size) largeStr '.csv']
};
i = 1;
[ jobCompleted(b,:) ] = obtain_job_completed( output_folder, files, QUEUES{1});
end
for b=2:length(betas)
for imethod=1:length(methods)
performanceGains(b, imethod) = (jobCompleted(b, imethod)-jobCompleted(b, 1))/jobCompleted(b, 1)*100;
% performanceGains(b, imethod) = (jobCompleted(b, imethod)-jobCompleted(1, imethod))/jobCompleted(1, imethod)*100;
end
end
%%
if plots(1)
figure;
scrsz = get(groot,'ScreenSize');
% hBar = bar(jobCompleted', 'group');
% plot(betas,performanceGains(:,2:length(methods)));
% plot(betas,performanceGains(:,1), 'LineWidth',LineWidth);
% hold on;
% plot(betas,performanceGains(:,2), 'LineWidth',LineWidth);
% hold on;
% plot(betas,performanceGains(:,4), 'LineWidth',LineWidth);
% hold on;
plot(betas,performanceGains(:,3), 'LineWidth',LineWidth);
hold on;
% plot(betas,performanceGains(:,5), 'LineWidth',LineWidth);
% hold on;
plot(betas,performanceGains(:,6), 'LineWidth',LineWidth);
%title('Average completion time of interactive jobs','fontsize',fontLegend);
xLabel='speedup rate \beta';
yLabel='performance gain (%)';
% legendStr={'DRF','FDRF','MP','MSR','Pricing'};
legendStr={'FDRF','Pricing'};
% set(gca,'yscale','log')
xLabels=methods;
legend(legendStr,'Location','northoutside','FontSize',fontLegend,'Orientation','horizontal');
set (gcf, 'Units', 'Inches', 'Position', figSizeOneCol, 'PaperUnits', 'inches', 'PaperPosition', figSizeOneCol);
xlabel(xLabel,'FontSize',fontAxis);
ylabel(yLabel,'FontSize',fontAxis);
if is_printed
figIdx=figIdx +1;
fileNames{figIdx} = 'performance_gain';
epsFile = [ LOCAL_FIG fileNames{figIdx} '.eps'];
print ('-depsc', epsFile);
end
end
%%
for i=1:length(fileNames)
fileName = fileNames{i}
epsFile = [ LOCAL_FIG fileName '.eps'];
pdfFile = [ fig_path fileName '.pdf']
% pdfFile = [ LOCAL_FIG fileName '.pdf']
cmd = sprintf(PS_CMD_FORMAT, epsFile, pdfFile);
status = system(cmd);
end