From 33dbff74d546d5c99cfbc2bf2c9305fed3314f34 Mon Sep 17 00:00:00 2001 From: martji Date: Mon, 1 Sep 2014 15:01:08 +0800 Subject: [PATCH] 1. fix interface in *Server.java 2. fix the experience.jsp page 2.1. delete 2 unuseful paras 2.2. add Throughput chart 2.3. add select to choose the rate 3. bug fix --- .../classes/dao/MemcachedServer$bench.class | Bin 3242 -> 3232 bytes .../WEB-INF/classes/dao/MemcachedServer.class | Bin 6207 -> 6327 bytes .../classes/dao/RMemcachedServer$bench.class | Bin 2701 -> 2701 bytes .../classes/dao/RMemcachedServer.class | Bin 9731 -> 9728 bytes .../WebRoot/WEB-INF/classes/dbcfg.properties | 5 + .../classes/servlets/GetInfoServlet$1.class | Bin 807 -> 807 bytes .../classes/servlets/GetInfoServlet$2.class | Bin 806 -> 806 bytes .../classes/servlets/GetInfoServlet.class | Bin 4111 -> 4968 bytes Website/WebRoot/css/memcache.css | 16 +++- Website/WebRoot/experience.jsp | 87 ++++++++++++------ Website/src/dao/MemcachedServer.java | 20 ++-- Website/src/dao/RMemcachedServer.java | 22 +++-- Website/src/dbcfg.properties | 5 + Website/src/servlets/GetInfoServlet.java | 54 ++++++++--- 14 files changed, 152 insertions(+), 57 deletions(-) create mode 100644 Website/WebRoot/WEB-INF/classes/dbcfg.properties create mode 100644 Website/src/dbcfg.properties diff --git a/Website/WebRoot/WEB-INF/classes/dao/MemcachedServer$bench.class b/Website/WebRoot/WEB-INF/classes/dao/MemcachedServer$bench.class index 92f1e31ad428c6706153f904ee58cb69b1b493ea..fd0c6ed0a108ea305e3e834c7a71ab964f76f25b 100644 GIT binary patch delta 279 zcmZvVy-NaN0EeG9FYp5k>L3pSIV!koIhyuA%}iTU_MAOwCu8X!MIRV4 z%!z-P6Y8FI=^H3y@sOj3P5Q~BQ6R_`!#IpmOt;)6vxJ*%{FLcq2bBr|s_5)uQo~}8 z5c`aC;AA~1u~?VFhLjyLNE3q=V;m9Ym#7r$(Klbh4TsU}0l#%{ixRPBROVQg$|0nzFEvq|uB^ zIG9@<#{CkKyF^p`0E=1k{Q;}@?d|F5U6gsbS<_^~PI;E+x}#%h6`nmb;ySKlIm4N{ zrpFD#9QY6Ldz#XX`U)CLgjuGA9PQ+htkTIE3D)UmBNK!Q<`yBgX~w6G9b)X#!5%sV zOo~{PNK&ScioXz^5L1B??km{=ajF;`(#sM395cuXHm9UGW1Mp)xnP=0X1HROYv#Ej y%dNU{r^NSEcp%_Wtxvr2%r`ImsP@a7Xy9E$`4FvqiWoH^sfsSXF#Ne_MEn7MyH?Tw diff --git a/Website/WebRoot/WEB-INF/classes/dao/MemcachedServer.class b/Website/WebRoot/WEB-INF/classes/dao/MemcachedServer.class index b0d098cc67e3fe1e8eb876a21821cb92d57a59b2..89f5e31a0a4bf885af00e6c242d0a52c1db1b665 100644 GIT binary patch literal 6327 zcma)A3w%@8dH;Ww3wfL|gQYyycP#(-rz!~ydN7#k26n^*?ol7?K%H%1^!igZOn zleQ}*YuBu6+N@2Mw!f9EoA>B8ViwtyHf#1swlrJPZuzxK+CAE>Ter5`nrv&+Hs1f- zdu>a>S>}h%Io~9K7*k#`ZKl6fAlJ-*NpJ(C)Z zJC>6dEcNyaPBIleWMz3joX(8e{%&1gCN~y6mCvN32jT<$yK_0~ERQU5PUdWDbWf&` zCJl)xqK=hwV(C%)UO~`Fj@yJE5NJ6&Uq~rJl|11TIH@h+s5_HM*;bk;^<+Bf>`hr? z0&}o8exz?`X#e0qUyoq%o=lo|)6P*VRj>nqyvF0(6Df6Lry$V0{wQhgA=d^Pajk|` zWttmuc{Q;bYltjS$mQ&`;{gSA&Ff3p@u1rjn(Iw8VXYuCW;?3bcv}AyjI(xlBpk0UcXupZ2XCt?iv# zT5oLa=-AxV(bm@1u7f5j-DsQJ*ipW*d2ZvD@{RT_9xBDdZW9`G4SNLDt`x5O?YHtL z>4FBj(Q9HaR?um-yGB-b_L~U9&_JiEx!NfW#L%mb9Wt>9rkV|ySd1lVcB_e{-YjmS z3e^gB#6%5D1II9|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sk7`9wj2j@Tmem=XY_p*WI=7Bu@3#H-wB@y*7A8U=&|!ud1yo;H&P= zx})PiIfl74cybJ1I|ifOs3qs8MzHN|dLN>O9%1$R1dBGGi~PH>gxYK8Xf54%9X((@Eps8!bP=tx zfi~Gl8+2kdHj&ziC~dNvesCFkS70j~w%1@gpI+U#mGHfb_PQ6l@P5Sb5%x#vE054h zkD(Wz;jU90KgpB7P8&W=4nL<0{0@CerxCxwKk!e6s8;-l^Uw1ai1X;j|KhApxgW*98N77LF^2!J z4N{Ut?yP}(s0mqTQ1$@E=_pl{IG~iOfT1M#wIeuAMd+IHld6203UC!^4gASsil$+u zjDUFy7d!`ji-vDjk}FF=51&}WmeUBj{#HM;T~`G z6eX$R?9;^Yw(toxm!;2rcyhA$S>M`YI3dxZuJwePUxCL|&Gr#=mJzzoovZ4+S*&zj zj)aC%LSXp|R#cKuwn7V4hW!0)dPoZe`rCrVpd)@USDjfmrWT)2OMJLghK(V;Y}^zI zPLAm{^dzAaC8he5aKuDb2vg+AHw%=v#a3@b?3*oRWtPpCXUBlXz}TV2ULW# z3UayyU%< vt?UUbU_P1h>C?A#Pne+ekeyRL>+PtYIE4P$BLb)$YA0Lq)KgGu7mWV`9m%=X diff --git a/Website/WebRoot/WEB-INF/classes/dao/RMemcachedServer$bench.class b/Website/WebRoot/WEB-INF/classes/dao/RMemcachedServer$bench.class index 913a04fcafcd0f83828d80d2b7917bb3bead1435..39386f49bca0ae712a06f628371cade66fdb7a44 100644 GIT binary patch delta 187 zcmWN}y-Gp>0D#f&1JirWZejOY{uGr~dZ7mQ)>>R0dfkf_^u6a|DciqsI$ESQcx}~oY1KlxHz?VY4 abx*1a6IGe2&aWb7ikY9Eg_7RH9-jcw#3B;_ diff --git a/Website/WebRoot/WEB-INF/classes/dao/RMemcachedServer.class b/Website/WebRoot/WEB-INF/classes/dao/RMemcachedServer.class index 80d9cbe591064881bf1f8aaf162bf1cb79ad9aa2..5630c25662a7fb428f67fc694682366b726f8dc4 100644 G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b~qbs~(W6GjdJS z{2{qcpg1!mH}b~ksrC0sS-CIdACgZN@uPCNF(jX1QG5Vz>g_?EafD*seG6XK=Pz(k zU|8f`=9Iw}JGYa+kU0TmW|JW#-c+}ME zcAgydx=UWjTJ?Swe2{s3JD;WsqeK?+W56QJlEtWzQ?OW0#d0}~E?bMOaymaaFTox; zgATrw&|8PgWf`;ha%Scg%*bcr0JF|ryxuRX@VKnT6S4-+GlRb>XW=zj$B!cG@h4vY z&5T>je;HE3hG&H=mAPzhhRNAVwuv`N3;)|pZqJn+>`LyER)*MC>5%P?ryU}gXmkGi z>S^TMmKWs*bg>dyB|nrOF({|Xsq&J%Oc`fMjr>@CLdUCNfApvF3WG8%l}EJMDU9If};V}Juk|u@=JzM7Xjl}3{R8UeMny8T`?<~TjkeWVMz;ju8`mGU-;~B z?taU=Hs|hlywgy<3KK>&B%E}eGGw12*BkOtgDnAIgjvoSXT*?OIl*89fs>A4IiF|D zc>^aFjS!N?C&eM=J(reZz;o*jd7gh?AQot+-ir>ZnoH+2^kF?w{`KV*%stbb z+|ymBI55wx!WEYFCHfH~wXd)`=d7{$gL;ga(67x}sPZ``Ix{x1LERYiD?Q~n9_Kgid& AssI20 diff --git a/Website/WebRoot/WEB-INF/classes/dbcfg.properties b/Website/WebRoot/WEB-INF/classes/dbcfg.properties new file mode 100644 index 0000000..9630ee7 --- /dev/null +++ b/Website/WebRoot/WEB-INF/classes/dbcfg.properties @@ -0,0 +1,5 @@ +url = jdbc:mysql://192.168.3.218:3306/tpcw +username = root +password = 1234 +sqlget = select c_id, c_uname, c_passwd, c_birthdate from customer where c_id = ? +sqlset = replace into customer(c_id, c_birthdaye) values(?, ?) \ No newline at end of file diff --git a/Website/WebRoot/WEB-INF/classes/servlets/GetInfoServlet$1.class b/Website/WebRoot/WEB-INF/classes/servlets/GetInfoServlet$1.class index dcd03f82e2431e4a0662e711029543402c47f3b9..7dc71396e0d57630b81518a50798ae484cbb0d4c 100644 GIT binary patch delta 23 fcmZ3^ww!Il8YafL$!nSHSrZx98ImS{WHJK)TT%xk delta 23 fcmZ3^ww!Il8YafT$!nSHSwk4u8A2z2WHJK)S=k2t diff --git a/Website/WebRoot/WEB-INF/classes/servlets/GetInfoServlet$2.class b/Website/WebRoot/WEB-INF/classes/servlets/GetInfoServlet$2.class index eed4c33cd76512ddd0449895fb9c59633d56ed55..bb53852c92fd1d0c91cad530963ab9656c751767 100644 GIT binary patch delta 23 fcmZ3+wv27VY9_{%$!nPGS<@NV88Rk+U@`*$Te1f+ delta 23 fcmZ3+wv27VY9_|;$!nPGS)&-(8KNhDU@`*$S~&*_ diff --git a/Website/WebRoot/WEB-INF/classes/servlets/GetInfoServlet.class b/Website/WebRoot/WEB-INF/classes/servlets/GetInfoServlet.class index 44776b56241ecade5e3804e447990de48d179c3d..e665660b91dcbacbdac6e788b478526c1ae0b183 100644 GIT binary patch delta 2562 zcmZuz4Rlo15&q^S?`L0L_}ToxN(hNU4W5!E&`{h|kDMbhbb)&0+>%T59!P0at-Z-+=OL@b$k&C14-Bf#oE|mMw5i1 z3Wq!esg)W!2~?%wR)V@Z5x*sAB{Y1QP3Kl#S*>9+OUbr)yM`@(5r~R!5PW<Qvu)~0iZxZ|!4Z9{yabA(92DV|R0KY|;QqeHxtGOcHzyo+t=teC|&{I(_ob1IzD)u?6l*^{?7p^9@ zCn7OBXq%z+%MxbD^5ENeM8(6-Ud5O5DALYhrCfOoPpEj@8CHr@2k~8ku{s`)T4rp8 z8SSu`mWtUcJ$OpkeUDHOHsk(AYeUEkwOQdHGa%UOBjndcVv%H987Ea<&NX|6psjHs zi|dv_lZt*ece9Vg{nv}YS`rc4N{HR(3>=0M;)K>jJCbbzdfvbbE*+t0JZW9XJ}gpr z*}xC*Lq350+qF@1E!WJA@ke4Kt>Gse4;Q7Z*-CaqZH`B0t0M+p#cR&%>g7wH!Vwie z=WybQwf=RceZ{U~ALwg6eUCsCc25rt_Z4LKd zVe0>Qs?qQ(_R^^1ZBdtB6N)d=T6}BBYP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2$ zrq}uE4K3m;ES)`Ts;(;wc>W$4yRnC8HbV`>04uc3ipFN~47Ra5}Ktf%hoEsPPkPMI5v?IfrER;{y?g>6ES#pC8r~Q^tq*$U5pA zW&c>lC-~I5?3^hdmGL>gAod%hrd2H6HuP9>QcOd_E;#w$H{9i0t4~@t)2=64riQMW zw^EZRuA4&m^XX7|D@r6l!(kePA?cR@PN2z2;4~OkhFqP36V^gm6Ea~#mUWYBh-Gu- z2qQ=vMOvY73+$L=#ay>bsT~j@0j%FT=(;tBwbQ&ZTKurilQ@AE*%J1VU6|%BjHAe5 zWv0!Ikrs#6i>At67?oo^LN}t_Xo+KC($<=^ElJuskv>Zqtd8T! zj(^W~p*mgrBa+=4!PO&|B zGmf2pA&+}qlcT;1-K*Tak;y_A-tyafvA?n#@AyTJ=ziCIz_u6fSEgnNJvda_gCo1~ zSt=@M>r0MwXHxCOE(-a|@9;Q0VmyYgD?AQf%9-bJUQ=p2Qg8~t;vCwTm*udrbjfX; zV;rF;3b>o(X>emYu17w+n1S&qKp6^gAMQaliV&m+Yz1b~D(-tcqSc1&dfc7Bda4tc9L43rpB$EM;5q5Zi%eY!8;R{q%|*z)BW7 zgw?o?`f0}i8jya-aFNEPVaVh|L{b)p6B}N(g*yBWsTj{TPzOH{AJud}k5eZCROgzqYn;3nGA8_ zEa8#C{`dNgM*SRF#v<(!%0z5rmyj;vcXkm|FJN+kh&KD63mBS`kkYa*qL$h?Pry=; wPH{HU22&2;Mq1YJ^dXbhB^aO*WS|?GU?2s5kd}f!@fUsFBpLMOzt-gEKV)08D*ylh diff --git a/Website/WebRoot/css/memcache.css b/Website/WebRoot/css/memcache.css index adef74a..db65c43 100644 --- a/Website/WebRoot/css/memcache.css +++ b/Website/WebRoot/css/memcache.css @@ -256,7 +256,7 @@ margin-left: 0; margin-bottom : 2px; } .paraitem { - width: 160px; + width: 180px; text-align:left; padding-top:8px; padding-left:8px; @@ -264,20 +264,28 @@ margin-left: 0; border-right:1px solid silver; } .parasinput { - width:80px; + width:100px; + font-size: 1em; + padding-left:2px; + font-family: Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco, "Courier New", monospace; +} +.modeselect { + width:120px; + height:25px; font-size: 1em; font-family: Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco, "Courier New", monospace; } .buttons { width: 300px; - float:left; + float:right; text-align:right; - margin-right:20px; + margin-right:40px; padding-top:8px; height:32px; } .parasbutton { width:120px; + margin-right:20px; text-align:center; font-size: 1em; font-family: Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco, "Courier New", monospace; diff --git a/Website/WebRoot/experience.jsp b/Website/WebRoot/experience.jsp index 8d7f3e4..2e58e8b 100644 --- a/Website/WebRoot/experience.jsp +++ b/Website/WebRoot/experience.jsp @@ -50,26 +50,25 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
-
- +
+
- +
-
- - -
-
- - -
-
- - +
+ +
+
@@ -116,8 +115,13 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
-
Result
-
+
Delay
+
+
+
+
+
Throughput
+
@@ -182,15 +186,14 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. $('#time1').text("0.000"); var para1 = document.getElementById("para1").value; var para2 = document.getElementById("para2").value; - var para3 = document.getElementById("para3").value; - var para4 = document.getElementById("para4").value; - var para5 = document.getElementById("para5").value; - if (para1 == '' || para2 == '' || para3 == '' || para4 == '' || para5 == ''){ + var para3 = $('#para3').val(); + + if (para1 == '' || para2 == '' || para3 == ''){ alert("必须输入完整的参数!"); return; } - var paras= 'para1='+para1+'¶2='+para2+'¶3='+para3+'¶4='+para4+'¶5='+para5; - var url = "servlets/GetInfoServlet?"+paras; + var paras= 'para1='+para1+'¶2='+para2+'¶3='+para3; + var url = "servlets/GetInfoServlet?"+paras; xmlHttp.onreadystatechange = getResult; xmlHttp.open("POST",url,true); xmlHttp.send(null); @@ -280,12 +283,14 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. }); } function showBar(arrayObj){ - $('#chart1').html(''); + $('#chart1-1').html(''); + $('#chart1-2').html(''); $('#chart2').html(''); $('#chart3').html(''); if (arrayObj == null){ progresslength1 = 0; - var data1 = [[0,'Memcached'], [0,'R-Memcached']]; + var data1_1 = [[0,'Memcached'], [0,'R-Memcached']]; + var data1_2 = [[0,'Memcached'], [0,'R-Memcached']]; var innerdata2 = [['Node0000', 0], ['Node0001', 0], ['Node0002', 0], ['Node0003', 0]]; var innerdata3 = [['Node0000', 0], ['Node0001', 0], ['Node0002', 0], ['Node0003', 0]]; var data2 = [innerdata2, innerdata2]; @@ -296,7 +301,8 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. $('#time1').text(dataTime); progresslength1 = 180; - var data1 = [[dataTime*2,'Memcached'], [dataTime,'R-Memcached']]; + var data1_1 = [[dataTime*2,'Memcached'], [dataTime,'R-Memcached']]; + var data1_2 = [[dataTime*2,'Memcached'], [dataTime,'R-Memcached']]; var innerdata21 = [['Node0000', arrayObj[1]], ['Node0001', arrayObj[3]], ['Node0002', arrayObj[5]], ['Node0003', arrayObj[7]]]; var innerdata22 = [['Node0000', arrayObj[2]], ['Node0001', arrayObj[4]], @@ -306,7 +312,7 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. } jQuery.jqplot.config.enablePlugins = true; - var plot1 = $.jqplot('chart1', [data1], { + var plot1_1 = $.jqplot('chart1-1', [data1_1], { title:'R-Memcached VS Memcached', seriesDefaults: { pointLabels: {show: true}, @@ -327,7 +333,34 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. } }, xaxis: { - label: 'Time Cost', + label: 'Time Cost / ms', + labelRenderer: $.jqplot.CanvasAxisLabelRenderer + } + } + }); + + var plot1_2 = $.jqplot('chart1-2', [data1_2], { + title:'R-Memcached VS Memcached', + seriesDefaults: { + pointLabels: {show: true}, + shadow: false,showMarker: true, + renderer: $.jqplot.BarRenderer, + rendererOptions: { + barDirection: 'horizontal', barWidth: 60, barMargin:50 + } + }, + axes: { + yaxis: { + renderer: $.jqplot.CategoryAxisRenderer, + labelRenderer: $.jqplot.CanvasAxisLabelRenderer, + tickRenderer: $.jqplot.CanvasAxisTickRenderer, + tickOptions: { + fontFamily: 'Courier New', + fontSize: '12pt' + } + }, + xaxis: { + label: 'Throughout Capacity', labelRenderer: $.jqplot.CanvasAxisLabelRenderer } } diff --git a/Website/src/dao/MemcachedServer.java b/Website/src/dao/MemcachedServer.java index dd0f1d4..056b450 100644 --- a/Website/src/dao/MemcachedServer.java +++ b/Website/src/dao/MemcachedServer.java @@ -8,7 +8,7 @@ import java.util.Map; import java.util.Random; import com.meetup.memcached.*; -import com.meetup.memcaheded.db.DatabaseCon; +import com.myself.database.DatabaseCon; import com.myself.server.webSession; import org.apache.log4j.PropertyConfigurator; @@ -29,6 +29,8 @@ public class MemcachedServer { public static Boolean status = false; public static Boolean initFlag = false; + private static final int RESULTTHROLD = 500; + public static void main(String[] args) { MemcachedServer.run(new String[]{"10","1000","1000","64","0.8"}); } @@ -59,9 +61,9 @@ public class MemcachedServer { int threads = Integer.parseInt(args[0]); int runs = Integer.parseInt(args[1]); - int Nums = Integer.parseInt(args[2]); - int size = Integer.parseInt(args[3]); - double rate = Double.parseDouble(args[4]); + int Nums = 10000; + int size = 64; + double rate = Double.parseDouble(args[2]); threadCount = threads; byte[] obj = new byte[size]; @@ -75,7 +77,11 @@ public class MemcachedServer { } oldStats = getStats(); - DatabaseCon.getInstance().start(); + try { + DatabaseCon.getInstance().start(); + } catch (Exception e) { + DatabaseCon.getInstance().start(ORIGINPATH); + } MemcachedServer.initFlag = true; for (int i = 0; i < threads; i++) { @@ -138,7 +144,7 @@ public class MemcachedServer { JSONArray results = new JSONArray(); JSONArray arrays = webSession.results; int endIndex = arrays.length(); - for (int i = startIndex; i < endIndex && i < startIndex + 1000; i++){ + for (int i = startIndex; i < endIndex && i < startIndex + RESULTTHROLD; i++){ try { JSONObject aResult = (JSONObject) arrays.get(i); results.put(aResult); @@ -146,7 +152,7 @@ public class MemcachedServer { e.printStackTrace(); } } - startIndex = endIndex < startIndex+1000 ? endIndex : startIndex+1000; + startIndex = endIndex < startIndex+RESULTTHROLD ? endIndex : startIndex+RESULTTHROLD; return results; } diff --git a/Website/src/dao/RMemcachedServer.java b/Website/src/dao/RMemcachedServer.java index 7aa581f..7eb535f 100644 --- a/Website/src/dao/RMemcachedServer.java +++ b/Website/src/dao/RMemcachedServer.java @@ -46,6 +46,8 @@ public class RMemcachedServer { public static long time = 0; private static Map localStats = new HashMap<>(); public static JSONArray nodeStats = new JSONArray(); + + private static final int RESULTTHROLD = 500; public static void main(String[] args){ // for (int i = 0; i < 1; i++){ @@ -107,9 +109,9 @@ public class RMemcachedServer { int threads = Integer.parseInt(args[0]); int runs = Integer.parseInt(args[1]); - int Nums = Integer.parseInt(args[2]); - int size = Integer.parseInt(args[3]); - double rate = Double.parseDouble(args[4]); + int Nums = 10000; + int size = 64; + double rate = Double.parseDouble(args[2]); RMemcachedServer.threadCount = threads; RMemcachedServer.requestCount = runs*threads; @@ -124,7 +126,11 @@ public class RMemcachedServer { } getStats(); - DatabaseCon.getInstance().start(); + try { + DatabaseCon.getInstance().start(); + } catch (Exception e) { + DatabaseCon.getInstance().start(ORIGINPATH); + } RMemcachedServer.initFlag = true; for (int i = 0; i < threads; i++) { @@ -163,17 +169,17 @@ public class RMemcachedServer { JSONArray results = new JSONArray(); JSONArray arrays = webSession.results; int endIndex = arrays.length(); - for (int i = startIndex; i < endIndex && i < startIndex + 1000; i++){ + for (int i = startIndex; i < endIndex && i < startIndex + RESULTTHROLD; i++){ try { JSONObject aResult = (JSONObject) arrays.get(i); - int nodeNum = Integer.parseInt((String) aResult.get("node")); - aResult.put("node", getOriginNode(nodeNum)); +// int nodeNum = Integer.parseInt((String) aResult.get("node")); +// aResult.put("node", getOriginNode(nodeNum)); results.put(aResult); } catch (Exception e) { e.printStackTrace(); } } - startIndex = endIndex < startIndex+1000 ? endIndex : startIndex+1000; + startIndex = endIndex < startIndex+RESULTTHROLD ? endIndex : startIndex+RESULTTHROLD; return results; } diff --git a/Website/src/dbcfg.properties b/Website/src/dbcfg.properties new file mode 100644 index 0000000..9630ee7 --- /dev/null +++ b/Website/src/dbcfg.properties @@ -0,0 +1,5 @@ +url = jdbc:mysql://192.168.3.218:3306/tpcw +username = root +password = 1234 +sqlget = select c_id, c_uname, c_passwd, c_birthdate from customer where c_id = ? +sqlset = replace into customer(c_id, c_birthdaye) values(?, ?) \ No newline at end of file diff --git a/Website/src/servlets/GetInfoServlet.java b/Website/src/servlets/GetInfoServlet.java index 1ca1bb8..fb5c2ba 100644 --- a/Website/src/servlets/GetInfoServlet.java +++ b/Website/src/servlets/GetInfoServlet.java @@ -14,6 +14,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; import dao.MemcachedServer; import dao.RMemcachedServer; @@ -70,13 +72,24 @@ public class GetInfoServlet extends HttpServlet { PrintWriter out = response.getWriter(); int type = request.getParameterMap().size(); switch (type) { - case 5:{ + case 3:{ System.out.println("Start Run!!!"); - final String[] args = new String[5]; + final String[] args = new String[3]; for (int i = 1; i <= args.length; i++) { args[i-1] = request.getParameter("para"+i); System.out.print("I = " + args[i-1] + "; "); } + if (args[2].equals("read")){ + args[2] = "1"; + } else if (args[2].equals("browser")){ + args[2] = "0.95"; + } else if (args[2].equals("shop")){ + args[2] = "0.8"; + } else if (args[2].equals("order")){ + args[2] = "0.5"; + } else { + args[2] = "0"; + } System.out.println(); new Thread(new Runnable() { @Override @@ -106,7 +119,8 @@ public class GetInfoServlet extends HttpServlet { } break; case 1:{ - while (!RMemcachedServer.initFlag && !RMemcachedServer.status) { + while (!RMemcachedServer.initFlag && !RMemcachedServer.status && + !MemcachedServer.initFlag && !MemcachedServer.status) { try { Thread.sleep(100); } catch (InterruptedException e) { @@ -114,22 +128,40 @@ public class GetInfoServlet extends HttpServlet { } } System.out.println("Get Result!!!"); - String result = RMemcachedServer.getResult().toString(); - out.println(result); + JSONArray resultR = RMemcachedServer.getResult(); + JSONArray resultM = MemcachedServer.getResult(); + JSONObject result = new JSONObject(); + try { + result.put("R", resultR); + result.put("M", resultM); + } catch (JSONException e) { + e.printStackTrace(); + } + + out.println(result.toString()); out.flush(); out.close(); } break; case 2:{ - float time = RMemcachedServer.time / 1000000000.0f; - JSONArray stats = RMemcachedServer.nodeStats; - Map timeandStats = new HashMap(); - timeandStats.put("time", String.format("%.3f", time)); - timeandStats.put("stats", stats.toString()); + float timeR = RMemcachedServer.time / 1000000000.0f; + JSONArray statsR = RMemcachedServer.nodeStats; + float timeM = MemcachedServer.time / 1000000000.0f; + JSONArray statsM = MemcachedServer.nodeStats; + + Map timeandStatsR = new HashMap(); + timeandStatsR.put("time", String.format("%.3f", timeR)); + timeandStatsR.put("stats", statsR.toString()); + Map timeandStatsM = new HashMap(); + timeandStatsM.put("time", String.format("%.3f", timeM)); + timeandStatsM.put("stats", statsM.toString()); + JSONArray jsons = new JSONArray(); - jsons.put(timeandStats); + jsons.put(timeandStatsR); + jsons.put(timeandStatsM); String result = jsons.toString(); //System.out.println(result); + out.println(result); out.flush(); out.close();