Skip to content

Commit 89ba4d5

Browse files
committed
a
1 parent e74beb9 commit 89ba4d5

File tree

6 files changed

+168
-41
lines changed

6 files changed

+168
-41
lines changed

cpumemoryrxtxjmeterplotSUM.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@
7979

8080
set(gcf,'Units','Inches');
8181

82-
title({'Node Memory SUM: redis cluster (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
83-
%title({'Node Command SUM: redis cluster (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
84-
%title({'CPU SUM: iotmyth (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
85-
%title({'Network RX SUM: ingress (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
86-
%title({'Network TX SUM: ingress (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
82+
title({'Node Memory SUM: redis cluster (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
83+
%title({'Node Command SUM: redis cluster (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
84+
%title({'CPU SUM: iotmyth (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
85+
%title({'Network RX SUM: ingress (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
86+
%title({'Network TX SUM: ingress (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
8787

8888
%title({'HTTP Response Times over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
8989
%title({'HTTP Latencies over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
90-
%title({'Bytes Throughput over Time (50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',15);
90+
%title({'Bytes Throughput over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',15);
9191

9292
xlabel('Elapsed time (minutes)','FontSize',15);
9393
ylabel(ylabelslat,'FontSize',15);

grafanaplot.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,19 @@
8888

8989
set(gcf,'Units','Inches');
9090

91-
%title({'Pod Count: ingress (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
92-
%title({'CPU SUM: ingress (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
93-
%title({'CPU: redis (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
94-
%title({'Node Memory: redis cluster (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
95-
title({'Node Command: redis cluster (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
96-
%title({'Network RX: ingress (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
97-
%title({'Network TX: ingress (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
98-
%title({'Network Load Balancer (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
91+
%title({'Pod Count: ingress (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
92+
%title({'CPU SUM: ingress (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
93+
%title({'CPU: redis (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
94+
%title({'Node Memory: redis cluster (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
95+
title({'Node Command: redis cluster (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
96+
%title({'Network RX: ingress (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
97+
%title({'Network TX: ingress (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
98+
%title({'Network Load Balancer (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
9999

100100

101101
%title({'HTTP Response Times over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
102102
%title({'HTTP Latencies over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
103-
%title({'Bytes Throughput over Time (50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',15);
103+
%title({'Bytes Throughput over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',15);
104104

105105

106106
xlabel('Elapsed time (minutes)','FontSize',15);

jmeterplot.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@
102102

103103
set(gcf,'Units','Inches');
104104

105-
%title({'Threads State over Time (50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
105+
%title({'Threads State over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
106106
%title({'HTTP Response Times over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
107107
%title({'HTTP Latencies over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
108108
%title({'Response Times Percentile (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
109109
title({'Transactions per second (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
110-
%title({'Bytes Throughput over Time (50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',15);
110+
%title({'Bytes Throughput over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',15);
111111
%title({'Response Codes per second (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
112112

113113
xlabel('Elapsed time (minutes), Granulation: 500 ms','FontSize',15);

redismongoSUM.m

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,8 @@
6262
% b_ex = [B,B2];
6363

6464
hold on
65-
% if(size(data,2) == 2)
66-
% markers = {'.'};
67-
% colors = {'r'};
68-
% ylabel(ylabels,'FontSize',14);
69-
% end
70-
%
71-
% if(size(data2,2) == 2)
72-
% markers = {'.'};
73-
% colors = {'r'};
74-
% ylabel(ylabels,'FontSize',14);
75-
% end
76-
77-
if(size(x) > size(x2))
65+
66+
if(max(B(:,size(B,2)))*1.2 > max(B2(:,size(B2,2)))*1.2)
7867
ylimit = max(B(:,size(B,2)))*1.2;
7968
else
8069
ylimit = max(B2(:,size(B2,2)))*1.2;
@@ -91,23 +80,25 @@
9180
plot(x2,B2(:,size(B2,2)),strcat(lines{line_counter},strcat(colors{color_counter},markers{marker_counter})),'MarkerSize',marker_size,'LineWidth',line_width,'color',[0 0.7 0])
9281
ylim([0 ylimit])
9382
set(gca,'Yticklabel',[])
83+
% y2lbl= ylabel('Document operations per second','FontSize',15);
84+
9485

9586
box on;
9687
grid on;
9788

9889
ax = gca;
9990
ax.YAxis(1).Exponent = 0;
10091
ax.YAxis(2).Exponent = 0;
92+
% ax.YAxis(1).Color = 'r';
93+
% ax.YAxis(2).Color = [0 0.7 0];
10194
ax.YAxis(1).Color = 'k';
10295
ax.YAxis(2).Color = 'k';
10396
ax.GridLineStyle = ':';
10497
ax.GridAlpha = 0.3;
10598
ax.LineWidth = 0.9;
10699
set(gca,'FontSize',16)
107100

108-
ax.YColor = 'black';
109-
box(ax,'on');
110-
% ax.YAxis(2).Visible='off'; % Removes right axis
101+
111102

112103

113104
legend('Redis Cluster','MongoDB Sharded');
@@ -119,15 +110,16 @@
119110

120111
set(gcf,'Units','Inches');
121112

122-
title({'Memory Utilization HTTP 50K Threads','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
123-
%title({'Node Command SUM: redis cluster (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
124-
% title({'CPU Utilization HTTP 50K Threads','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
125-
%title({'Network RX SUM: ingress (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
126-
%title({'Network TX SUM: ingress (HTTP 50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
113+
title({'Memory Utilization HTTP 50K Threads','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
114+
%title({'Database Operations HTTP 50K Threads','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
115+
%title({'Node Command SUM: redis cluster (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
116+
% title({'CPU Utilization HTTP 50K Threads','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
117+
%title({'Network RX SUM: ingress (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
118+
%title({'Network TX SUM: ingress (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
127119

128120
%title({'HTTP Response Times over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
129121
%title({'HTTP Latencies over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
130-
%title({'Bytes Throughput over Time (50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',15);
122+
%title({'Bytes Throughput over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',15);
131123

132124

133125
%ylim([0,max(B(:,size(B,2)))*1.2]);

redismongoSUM.m~

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
format longG
2+
clear all;close all;
3+
stringREDIS = 'CPU-data-as-seriestocolumns-2021-06-04 23_48_26';
4+
stringMONGO = 'CPU-data-as-seriestocolumns-2021-06-04 23_50_23';
5+
bytesDevider = 1000000;
6+
bytesDevider = 1;
7+
dataID = '4SUMREDISMONGO';
8+
data = readtable(strcat('/Users/mymac/Documents/SCRIPTSHEET/SKRIPSI/data_grafana/4/redis/',strcat(stringREDIS,'.csv')), 'ReadVariableNames', false, 'HeaderLines', 2);
9+
data2 = readtable(strcat('/Users/mymac/Documents/SCRIPTSHEET/SKRIPSI/data_grafana/4/mongo/',strcat(stringMONGO,'.csv')), 'ReadVariableNames', false, 'HeaderLines', 2);
10+
11+
% ini untuk format date seperti halnya di jmeter ya
12+
% 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);
13+
% x.Format = 'hh:mm:ss';
14+
15+
markers = {'+','x','*','o','x','v','d','^','s','>','<','v','p','h','p','v','<','>','s','^','d','v','x','o','.','*'};
16+
colors = {'r','g','b','k','y','c','g','r','b','m','k','y'};
17+
lines = {'-','--',':','-.',':','--'};
18+
line_width = 0.9;
19+
marker_size = 5;
20+
marker_counter = 1;
21+
color_counter = 1;
22+
line_counter = 1;
23+
ylabels='Response times (ms)';
24+
ylabelslat = 'Mega Bytes (MB)';
25+
ylabelscpu='Number of core CPU';
26+
ylabels1='Number of threads';
27+
ylabels2='Mega Bytes (MB)';
28+
yredis = 'Command executed per second';
29+
ylabelstruput='Mega Bytes (MB) per second';
30+
ylabels3='TCP connections';
31+
ythread='Number of active threads';
32+
%legend_base_name = 'Worker-';
33+
% legend_base_name = 'All nodes';
34+
35+
36+
% kalo ini format number dalam menit elapsed time
37+
x = (datenum(datestr(data{:,1}, 'yyyy-mm-dd hh:MM:ss.fff')) - datenum(datestr(data{1,1}, 'yyyy-mm-dd hh:MM:ss.fff'))) * 100000/60;
38+
x2 = (datenum(datestr(data2{:,1}, 'yyyy-mm-dd hh:MM:ss.fff')) - datenum(datestr(data2{1,1}, 'yyyy-mm-dd hh:MM:ss.fff'))) * 100000/60;
39+
% ini untuk data x yang pure number aja, bukan elapsed time
40+
%x = data{:,1};
41+
42+
% REDIS REMOVE FIRST COLUMN AND SUM ALL ROW
43+
temp_data = data;
44+
temp_data(:,1) = [];
45+
A = table2array(temp_data);
46+
A(isnan(A))=0;
47+
% A = rand(1000, 4); % Test data
48+
B = [A, sum(A, 2)/bytesDevider]; %1000000
49+
B(isnan(B))=0;
50+
51+
%MONGO
52+
temp_data2 = data2;
53+
temp_data2(:,1) = [];
54+
A2 = table2array(temp_data2);
55+
A2(isnan(A2))=0;
56+
% A = rand(1000, 4); % Test data
57+
B2 = [A2, sum(A2, 2)/bytesDevider]; %1000000
58+
B2(isnan(B2))=0;
59+
60+
% disp(B(:,size(B,2)));
61+
62+
% b_ex = [B,B2];
63+
64+
hold on
65+
66+
if(max(B(:,size(B,2)))*1.2 > max(B2(:,size(B2,2)))*1.2)
67+
ylimit = max(B(:,size(B,2)))*1.2;
68+
else
69+
ylimit = max(B2(:,size(B2,2)))*1.2;
70+
end
71+
72+
yyaxis left
73+
plot(x,B(:,size(B,2)),strcat(lines{line_counter},strcat(colors{color_counter},markers{marker_counter})),'MarkerSize',marker_size,'LineWidth',line_width)
74+
ylim([0 ylimit])
75+
marker_counter = marker_counter + 1;
76+
color_counter =color_counter+ 1;
77+
xlabel('Elapsed time (minutes)','FontSize',15);
78+
ylabel(yredis,'FontSize',15);
79+
yyaxis right
80+
plot(x2,B2(:,size(B2,2)),strcat(lines{line_counter},strcat(colors{color_counter},markers{marker_counter})),'MarkerSize',marker_size,'LineWidth',line_width,'color',[0 0.7 0])
81+
ylim([0 ylimit])
82+
set(gca,'Yticklabel',[])
83+
% y2lbl= ylabel('Document operations per second','FontSize',15);
84+
85+
86+
box on;
87+
grid on;
88+
89+
ax = gca;
90+
ax.YAxis(1).Exponent = 0;
91+
ax.YAxis(2).Exponent = 0;
92+
% ax.YAxis(1).Color = 'r';
93+
% ax.YAxis(2).Color = [0 0.7 0];
94+
ax.YAxis(1).Color = 'k';
95+
ax.YAxis(2).Color = [0 0.7 0];
96+
ax.GridLineStyle = ':';
97+
ax.GridAlpha = 0.3;
98+
ax.LineWidth = 0.9;
99+
set(gca,'FontSize',16)
100+
101+
102+
103+
104+
legend('Redis Cluster','MongoDB Sharded');
105+
106+
legend('show');
107+
lgd = legend;
108+
%lgd.FontSize=7;
109+
lgd.Location = 'northWest';
110+
111+
set(gcf,'Units','Inches');
112+
113+
%title({'Memory Utilization HTTP 50K Threads','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
114+
%title({'Database Operations HTTP 50K Threads','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
115+
%title({'Node Command SUM: redis cluster (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
116+
title({'CPU Utilization HTTP 50K Threads','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
117+
%title({'Network RX SUM: ingress (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
118+
%title({'Network TX SUM: ingress (HTTP 50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
119+
120+
%title({'HTTP Response Times over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
121+
%title({'HTTP Latencies over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
122+
%title({'Bytes Throughput over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',15);
123+
124+
125+
%ylim([0,max(B(:,size(B,2)))*1.2]);
126+
% xlim([min(x),max(x)])
127+
pos = get(gcf,'Position');
128+
set(findall(gcf,'-property','FontName'),'FontName','Times New Roman');
129+
set(gcf,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)]);
130+
print(gcf,'-dpdf',strcat('/Users/mymac/Documents/SCRIPTSHEET/SKRIPSI/hasilgrafik/',strcat(dataID,stringREDIS,stringMONGO)),'-r0');
131+
savefig(strcat('/Users/mymac/Documents/SCRIPTSHEET/SKRIPSI/hasilgrafik/',strcat(dataID,stringREDIS,stringMONGO)));
132+
% print -dpdf -painters hasilgrafik/1a
133+
colormap(gcf,hot);
134+
hold off;
135+

threadjmeterplot.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@
7171

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

74-
title({'SUM Threads State over Time (50K Threads)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',14);
74+
title({'SUM Threads State over Time (50K Threads)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
7575
%title({'HTTP Response Times over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
7676
%title({'HTTP Latencies over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',14);
77-
%title({'Bytes Throughput over Time (50K RPS)','Instance Type (m5.2xlarge/m5a.2xlarge)'},'FontSize',15);
77+
%title({'Bytes Throughput over Time (50K RPS)','Instance Type (m5.xlarge/m5a.xlarge)'},'FontSize',15);
7878

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

0 commit comments

Comments
 (0)