Skip to content

Commit 6d7f9a3

Browse files
committed
m
1 parent 743ab9a commit 6d7f9a3

File tree

4 files changed

+39
-32
lines changed

4 files changed

+39
-32
lines changed

grafanaplot.m

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
format longG
22

3-
stringCSV = 'PodCount-data-2021-06-0423_43_21';
3+
stringCSV = 'Memory-data-as-seriestocolumns-2021-06-0423_45_46';
44
dataID = '4';
55
namespace = 'iotmyth';
66
data = readtable(strcat(strcat(strcat('/Users/mymac/Documents/SCRIPTSHEET/SKRIPSI/data_grafana/',dataID),'/'),strcat(strcat(strcat(namespace,'/'),stringCSV),'.csv')), 'ReadVariableNames', false, 'HeaderLines', 2);
@@ -10,14 +10,16 @@
1010
% x.Format = 'hh:mm:ss';
1111

1212
markers = {'+','*','.','o','x','v','d','^','s','>','<','v','p','h','p','v','<','>','s','^','d','v','x','o','.','*'};
13+
% markers = {'.','^'};
1314
colors = {'r','b','m','k','y','c','g','r','b','m','k','y'};
1415
lines = {'-','-.','--',':',':','--'};
1516
line_width = 0.9;
16-
marker_size = 5;
17+
marker_size = 2.8;
1718
marker_counter = 1;
1819
color_counter = 1;
1920
line_counter = 1;
2021
ylabelspod='Number of pods';
22+
ylabelscpusum='Number of core CPU';
2123
ylabelslat = 'Response latencies (ms)';
2224
ylabels1='Number of threads';
2325
ylabels2='Mega Bytes (MB)';
@@ -26,6 +28,8 @@
2628
ythread='Number of active threads';
2729
%legend_base_name = 'Worker-';
2830
legend_base_name = 'iotmyth-pods-';
31+
% legend_base_name = 'iotmyth-cpu-';
32+
%legend_base_name = 'iotmyth-memory-';
2933

3034

3135
% kalo ini format number dalam menit elapsed time
@@ -41,7 +45,7 @@
4145
end
4246

4347
for i=1:size(data,2)-1
44-
plot(x,data{:,i+1},strcat(lines{line_counter},strcat(colors{color_counter},markers{marker_counter})),'MarkerSize',marker_size,'LineWidth',line_width,'DisplayName',strcat(legend_base_name,sprintf('%.0f',i)));
48+
plot(x,data{:,i+1}/1000000,strcat(lines{line_counter},strcat(colors{color_counter},markers{marker_counter})),'MarkerSize',marker_size,'LineWidth',line_width,'DisplayName',strcat(legend_base_name,sprintf('%.0f',i)));
4549

4650
if mod(i, size(markers,2)) == 0
4751
marker_counter = 1;
@@ -74,22 +78,24 @@
7478
set(gca,'FontSize',16)
7579
legend('show');
7680
lgd = legend;
77-
%lgd.FontSize=7;
81+
lgd.FontSize=10;
7882
%lgd.Location = 'northWest';
7983

8084
set(gcf,'Units','Inches');
8185

82-
title({'Pod Count: iotmyth (HTTP 50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
86+
%title({'Pod Count: iotmyth (HTTP 50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
87+
%title({'CPU SUM: iotmyth (HTTP 50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
88+
title({'Memory: iotmyth (HTTP 50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
8389
%title({'HTTP Response Times over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
8490
%title({'HTTP Latencies over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
8591
%title({'Bytes Throughput over Time (50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',15);
8692

8793
xlabel('Elapsed time (minutes)','FontSize',15);
88-
ylabel(ylabelspod,'FontSize',15);
94+
ylabel(ylabels2,'FontSize',15);
8995
pos = get(gcf,'Position');
9096
ymax = max(data{:,2});
91-
ylim([0,ymax(1)*1.2])
92-
xlim([min(x),max(x)])
97+
% ylim([0,ymax(1)*1.2])
98+
% xlim([min(x),max(x)])
9399
set(findall(gcf,'-property','FontName'),'FontName','Times New Roman');
94100
set(gcf,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)]);
95101
print(gcf,'-dpdf',strcat('hasilgrafik/',strcat(dataID,stringCSV)),'-r0');

jmeterplot.m

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
format longG
22

3-
stringCSV = 'thread';
3+
stringCSV = 'ResponseCodesPerSecond';
44
dataID = '4';
55
data = readtable(strcat('/Users/mymac/Documents/SCRIPTSHEET/SKRIPSI/data_jmeter/4/',strcat(stringCSV,'.csv')), 'ReadVariableNames', false, 'HeaderLines', 1);
66

@@ -18,6 +18,7 @@
1818
line_counter = 1;
1919
ylabels='Response times (ms)';
2020
ylabelslat = 'Response latencies (ms)';
21+
ylabelsrescode = 'Number of responses per second ';
2122
ylabels1='Number of threads';
2223
ylabels2='Mega Bytes (MB)';
2324
ylabelstruput='Mega Bytes (MB) per second';
@@ -45,10 +46,11 @@
4546
scatter(x,data{:,i+1},strcat(colors{color_counter},markers{marker_counter}),'DisplayName',strcat(legend_base_name,sprintf('%.0f',i)));
4647
else
4748
if(strcmp(stringCSV, 'BytesThroughputOverTime') || strcmp(stringCSV,'ResponseCodesPerSecond'))
49+
marker_size = 12;
4850
markers = {'.'};
4951
colors = {'r','b','g','m'};
5052
ylabel(ylabels,'FontSize',14);
51-
scatter(x,data{:,i+1}/1000000,strcat(colors{color_counter},markers{marker_counter}));
53+
plot(x,data{:,i+1},strcat(colors{color_counter},markers{marker_counter}),'MarkerSize',marker_size);
5254
else
5355
plot(x,data{:,i+1},strcat(lines{line_counter},strcat(colors{color_counter},markers{marker_counter})),'MarkerSize',marker_size,'LineWidth',line_width,'DisplayName',strcat(legend_base_name,sprintf('%.0f',i)));
5456
end
@@ -85,7 +87,8 @@
8587
set(gca,'FontSize',16)
8688

8789
if(strcmp(stringCSV, 'BytesThroughputOverTime') || strcmp(stringCSV,'ResponseCodesPerSecond'))
88-
legend('Bytes received per second','Bytes sent per second');
90+
% legend('Bytes received per second','Bytes sent per second');
91+
legend('success','502','504','timeout');
8992
end
9093
legend('show');
9194
lgd = legend;
@@ -96,15 +99,16 @@
9699

97100
%title({'Threads State over Time (50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
98101
%title({'HTTP Response Times over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
99-
title({'HTTP Latencies over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
102+
%title({'HTTP Latencies over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
100103
%title({'Bytes Throughput over Time (50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',15);
104+
title({'Response Codes per second (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
101105

102106
xlabel('Elapsed time (minutes), Granulation: 500 ms','FontSize',15);
103-
ylabel(ylabelslat,'FontSize',15);
107+
ylabel(ylabelsrescode,'FontSize',15);
104108
pos = get(gcf,'Position');
105109
set(findall(gcf,'-property','FontName'),'FontName','Times New Roman');
106110
set(gcf,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)]);
107-
% print(gcf,'-dpdf',strcat('hasilgrafik/',strcat(dataID,stringCSV)),'-r0');
111+
print(gcf,'-dpdf',strcat('hasilgrafik/',strcat(dataID,stringCSV)),'-r0');
108112
% print -dpdf -painters hasilgrafik/1a
109113
hold off;
110114

jmeterplot.m~

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
format longG
22

3-
stringCSV = 'thread';
3+
stringCSV = 'ResponseCodesPerSecond';
44
dataID = '4';
55
data = readtable(strcat('/Users/mymac/Documents/SCRIPTSHEET/SKRIPSI/data_jmeter/4/',strcat(stringCSV,'.csv')), 'ReadVariableNames', false, 'HeaderLines', 1);
66

@@ -18,6 +18,7 @@ color_counter = 1;
1818
line_counter = 1;
1919
ylabels='Response times (ms)';
2020
ylabelslat = 'Response latencies (ms)';
21+
ylabelsrescode = 'Respo'
2122
ylabels1='Number of threads';
2223
ylabels2='Mega Bytes (MB)';
2324
ylabelstruput='Mega Bytes (MB) per second';
@@ -32,13 +33,6 @@ x = (datenum(datestr(data{:,1}, 'yyyy-mm-dd hh:MM:ss.fff')) - datenum(datestr(da
3233
% ini untuk data x yang pure number aja, bukan elapsed time
3334
%x = data{:,1};
3435

35-
% REMOVE FIRST COLUMN AND SUM ALL ROW
36-
A = data; % Test data
37-
data(:,1) = [];
38-
disp(data);
39-
B = [A, sum(A, 2)];
40-
41-
4236
hold on
4337
if(size(data,2) == 2)
4438
markers = {'.'};
@@ -52,10 +46,11 @@ for i=1:size(data,2)-1
5246
scatter(x,data{:,i+1},strcat(colors{color_counter},markers{marker_counter}),'DisplayName',strcat(legend_base_name,sprintf('%.0f',i)));
5347
else
5448
if(strcmp(stringCSV, 'BytesThroughputOverTime') || strcmp(stringCSV,'ResponseCodesPerSecond'))
49+
marker_size = 15;
5550
markers = {'.'};
5651
colors = {'r','b','g','m'};
5752
ylabel(ylabels,'FontSize',14);
58-
scatter(x,data{:,i+1}/1000000,strcat(colors{color_counter},markers{marker_counter}));
53+
plot(x,data{:,i+1},strcat(colors{color_counter},markers{marker_counter}),'MarkerSize',marker_size);
5954
else
6055
plot(x,data{:,i+1},strcat(lines{line_counter},strcat(colors{color_counter},markers{marker_counter})),'MarkerSize',marker_size,'LineWidth',line_width,'DisplayName',strcat(legend_base_name,sprintf('%.0f',i)));
6156
end
@@ -92,7 +87,8 @@ ax.LineWidth = 0.9;
9287
set(gca,'FontSize',16)
9388

9489
if(strcmp(stringCSV, 'BytesThroughputOverTime') || strcmp(stringCSV,'ResponseCodesPerSecond'))
95-
legend('Bytes received per second','Bytes sent per second');
90+
% legend('Bytes received per second','Bytes sent per second');
91+
legend('success','502','504','timeout');
9692
end
9793
legend('show');
9894
lgd = legend;
@@ -103,8 +99,9 @@ set(gcf,'Units','Inches');
10399

104100
%title({'Threads State over Time (50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
105101
%title({'HTTP Response Times over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
106-
title({'HTTP Latencies over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
102+
%title({'HTTP Latencies over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
107103
%title({'Bytes Throughput over Time (50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',15);
104+
title({'Response codes per second (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
108105

109106
xlabel('Elapsed time (minutes), Granulation: 500 ms','FontSize',15);
110107
ylabel(ylabelslat,'FontSize',15);

threadjmeterplot.m~ renamed to memoryrxtxjmeterplot.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
format longG
22

3-
stringCSV = 'thread';
4-
dataID = '4';
5-
data = readtable(strcat('/Users/mymac/Documents/SCRIPTSHEET/SKRIPSI/data_jmeter/4/',strcat(stringCSV,'.csv')), 'ReadVariableNames', false, 'HeaderLines', 1);
3+
stringCSV = 'Memory-data-as-seriestocolumns-2021-06-0423_45_46';
4+
dataID = '4SUM';
5+
data = readtable(strcat('/Users/mymac/Documents/SCRIPTSHEET/SKRIPSI/data_grafana/4/iotmyth/',strcat(stringCSV,'.csv')), 'ReadVariableNames', false, 'HeaderLines', 2);
66

77
% ini untuk format date seperti halnya di jmeter ya
88
% x = seconds((datenum(datestr(data.ElapsedTime, 'yyyy-mm-dd hh:MM:ss.fff')) - datenum(datestr(data{1,1}, 'yyyy-mm-dd hh:MM:ss.fff'))) * 100000);
@@ -39,7 +39,7 @@
3939
% A = rand(1000, 4); % Test data
4040
B = [A, sum(A, 2)];
4141

42-
disp(B(:,5));
42+
disp(B(:,16));
4343

4444
hold on
4545
if(size(data,2) == 2)
@@ -48,7 +48,7 @@
4848
ylabel(ylabels,'FontSize',14);
4949
end
5050

51-
plot(x,B(:,5),strcat(lines{line_counter},strcat(colors{color_counter},markers{marker_counter})),'MarkerSize',marker_size,'LineWidth',line_width,'DisplayName',strcat(legend_base_name,''));
51+
plot(x,B(:,16),strcat(lines{line_counter},strcat(colors{color_counter},markers{marker_counter})),'MarkerSize',marker_size,'LineWidth',line_width,'DisplayName',strcat(legend_base_name,''));
5252

5353
box on;
5454
grid on;
@@ -70,7 +70,7 @@
7070

7171
set(gcf,'Units','Inches');
7272

73-
%title({'Threads State over Time (50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
73+
title({'SUM Threads State over Time (50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
7474
%title({'HTTP Response Times over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
7575
%title({'HTTP Latencies over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
7676
%title({'Bytes Throughput over Time (50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',15);
@@ -82,7 +82,7 @@
8282
pos = get(gcf,'Position');
8383
set(findall(gcf,'-property','FontName'),'FontName','Times New Roman');
8484
set(gcf,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)]);
85-
% print(gcf,'-dpdf',strcat('hasilgrafik/',strcat(dataID,stringCSV)),'-r0');
85+
print(gcf,'-dpdf',strcat('hasilgrafik/',strcat(dataID,stringCSV)),'-r0');
8686
% print -dpdf -painters hasilgrafik/1a
8787
hold off;
8888

0 commit comments

Comments
 (0)