diff --git a/.classpath b/.classpath index 5634d6545ad8c6fefdea1b5531c9f438391cfa85..f1b36324ebde6f39f88e405a814507a8e103f165 100644 --- a/.classpath +++ b/.classpath @@ -12,7 +12,6 @@ <attribute name="maven.pomderived" value="true"/> </attributes> </classpathentry> - <classpathentry kind="src" path="src/performancetest/java"/> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <attributes> <attribute name="maven.pomderived" value="true"/> diff --git a/experiments/results/blade2/Kieker.csv b/experiments/results/blade2/Kieker.csv deleted file mode 100644 index 3baa3f2c7cc1f42574d29644fa556d292475f140..0000000000000000000000000000000000000000 --- a/experiments/results/blade2/Kieker.csv +++ /dev/null @@ -1,20 +0,0 @@ -50;99703319;104370927;106408499;109646670;119511261;107238473;1193008 -100;199020106;208153845;213291928;218217473;232246810;213023365;1955142 -150;337297889;355560758;374306543;383545922;396757945;370360416;4929915 -200;467816371;495637042;516368133;534205012;559056847;516459829;6232480 -250;596127470;638856007;661346771;682121844;695630448;657343736;7369335 -300;716906859;742194975;769882958;782240095;830910818;769855241;8747627 -350;850336524;881553010;900993919;929031728;955373859;902102545;8244969 -400;969656446;1006937063;1023078332;1038249029;1075693049;1025527167;7191492 -450;1062203254;1117993711;1135809741;1157953147;1196129302;1136791217;8549326 -500;1194488793;1247819027;1265504819;1285478406;1338339829;1267369035;8747083 -550;1298891408;1360376230;1383581626;1396040687;1446252630;1379434067;8288796 -600;1411700331;1476794279;1495615473;1531373285;1563679683;1497879441;10907616 -650;1523133256;1592382895;1634060782;1653097655;1703704527;1623416690;11309726 -700;1651870606;1712296106;1745785579;1773041064;1833366800;1744948478;10870921 -750;1799434427;1857202331;1885811314;1901945050;1971356158;1884567832;11106500 -800;1945131323;1988332302;2016273307;2047321799;2101658581;2021289324;12028477 -850;2033874834;2087867598;2122065580;2144124665;2227767654;2121055456;11960673 -900;2128397748;2196552897;2252379476;2289845931;2360001206;2248629789;15635257 -950;2276660049;2357153010;2409342166;2455613183;2543463792;2410879283;17592400 -1000;2397618110;2483455455;2537434804;2586458979;2648410314;2536206534;17752209 diff --git a/experiments/results/blade2/TeeTime.csv b/experiments/results/blade2/TeeTime.csv deleted file mode 100644 index 4e32792c325d19d911f4bc71328a08bf6c6c5305..0000000000000000000000000000000000000000 --- a/experiments/results/blade2/TeeTime.csv +++ /dev/null @@ -1,20 +0,0 @@ -50;42972259;45705357;47674512;49547679;57755333;47888261;929367 -100;85877309;88345443;89831326;91647941;110193010;90534690;1108752 -150;126542704;127838796;129663613;132717583;138291205;130759226;849159 -200;163076624;169231946;171284689;173014501;177875192;171042545;1003788 -250;202760043;212712891;216424930;222157391;243168778;217828254;2127960 -300;244925102;254847492;261454494;268472096;279746994;262023035;2473294 -350;295270442;303466249;311341637;319395334;333577327;311815751;2871671 -400;341138790;352799999;362377914;368274816;384423758;361844612;2798439 -450;396709128;406946841;414903572;421594412;448577762;415427408;3346928 -500;436940925;455844783;463249285;471076154;487311733;463060680;3505921 -550;490942852;503270240;513216035;525717230;553667863;514508002;3871242 -600;534018864;551909955;563407664;576517848;608233860;564258423;4708689 -650;585511008;603485683;612588236;620917386;649830018;612712354;3755875 -700;625806026;644548893;653980673;668725528;688883586;656102636;5037661 -750;660155249;679620551;693767944;709739711;737548853;694983836;5521214 -800;706846579;722188246;733573899;754445900;797507209;738714440;6181884 -850;756893281;773948241;788668441;803770175;832249265;789954631;5736511 -900;802499245;820658704;835403073;848752408;864517350;835618338;4730065 -950;847020492;870432045;889375145;898214737;928178183;886081861;5345163 -1000;894084162;917140730;929015152;933826580;961602850;927688230;4714804 diff --git a/experiments/results/chw-home/Kieker.csv b/experiments/results/chw-home/Kieker.csv deleted file mode 100644 index 813a2fdafa87854232129da86e91bdc1c6014c8c..0000000000000000000000000000000000000000 --- a/experiments/results/chw-home/Kieker.csv +++ /dev/null @@ -1,20 +0,0 @@ -50;55192543;57460829;58720631;59471070;68356974;59104739;719930 -100;112944771;116962912;117861099;118904107;124795567;118259015;615219 -150;197336862;200525571;205128265;209809954;225915873;207242848;2129381 -200;260795647;271667216;277632111;284376702;300601405;278976020;2332638 -250;327968010;341060761;349715827;355444620;368655570;349381117;2711402 -300;403260622;416040618;427751567;443155321;524093929;436648353;7841529 -350;455973935;480969562;486255697;491892622;514066129;486514784;3087561 -400;523391178;545019921;551934495;558768028;595911407;552970569;3985442 -450;583940657;617119729;627036353;635250811;655591958;626617622;4611909 -500;651924313;686916142;698362024;710417619;736700549;699362609;4297125 -550;718410894;746477031;758306178;769407998;798066295;757779167;5100886 -600;784048733;806062203;824597615;834223718;866035907;822537789;6077305 -650;820801534;866889624;890863892;907769109;927715874;886504298;8091027 -700;878869736;938875330;969254517;980259204;1003336163;959789010;8279975 -750;947249238;990684606;1025992409;1054315713;1097805499;1023776953;10511749 -800;1013643367;1060443277;1088546570;1112696087;1156581718;1086779670;9252808 -850;1079448262;1132988082;1174349429;1190311404;1218065370;1162456069;10698345 -900;1128981351;1179976115;1221295916;1252696169;1273740652;1214642477;11873606 -950;1213440441;1291227789;1314440792;1330603470;1356654685;1305970559;10281130 -1000;1265263467;1321908614;1374805076;1412596204;1446151226;1368249384;14828493 diff --git a/experiments/results/chw-home/TeeTime.csv b/experiments/results/chw-home/TeeTime.csv deleted file mode 100644 index 9f0ceef60295e14db672e2da6f2c6fd6474846d0..0000000000000000000000000000000000000000 --- a/experiments/results/chw-home/TeeTime.csv +++ /dev/null @@ -1,20 +0,0 @@ -50;23719147;24224415;24556480;24966661;26641911;24637375;156333 -100;46846428;49305179;49937419;50441516;53028410;49837454;320676 -150;68027249;72912564;74121167;74971958;85937441;74059844;718037 -200;91326560;94605673;98486892;99291749;104344707;97521426;850592 -250;114627335;117963206;119062680;120667420;125979594;119414557;729333 -300;138366962;141700200;144498037;147383643;156184995;145001711;1170621 -350;164774526;169447144;173284771;176384246;184307305;173218474;1345961 -400;188961491;197178290;200394792;204703163;211820487;200851802;1637455 -450;215202583;219689421;224042261;228881936;241205231;225549979;1993251 -500;237638231;246374339;255144679;262169843;270582370;255362981;2699593 -550;262621570;275312625;282884893;287775183;296126563;281203096;2489021 -600;287798003;296009243;305027095;312065425;327250923;306079032;3088091 -650;313336053;321866485;327989659;337157307;353032096;330145073;3093973 -700;338501660;346819103;353133911;360440819;381988228;354366240;2742501 -750;360091200;367737781;373113735;379424154;388375008;373389434;1921847 -800;379083896;394145053;414746293;429602065;495171735;416848289;7638394 -850;402335812;415287838;424387902;433808621;446666441;424498095;2969743 -900;434722314;443555848;450499093;456066387;498858103;451649404;3461327 -950;448993241;460752464;469636905;475704492;491897889;469305365;2954267 -1000;479168215;490081328;494116147;500748684;519045359;495833420;2542993 diff --git a/experiments/results/chw-home/i7-3.5GHz-rev-26e53fc3ce9101294bd80a236c2b329e05872f93.txt b/experiments/results/chw-home/i7-3.5GHz-rev-26e53fc3ce9101294bd80a236c2b329e05872f93.txt deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/experiments/results/chw-work/Kieker.csv b/experiments/results/chw-work/Kieker.csv deleted file mode 100644 index f8865fde91579dec5002b39d8a37f64057123953..0000000000000000000000000000000000000000 --- a/experiments/results/chw-work/Kieker.csv +++ /dev/null @@ -1,20 +0,0 @@ -50;213288022;221332661;224869330;226740501;292880519;226981248;3394698 -100;428366753;440645131;447250470;452626290;469420849;447253237;2502077 -150;685240575;696427369;707731163;712835213;734419362;706963941;3174182 -200;926724655;960090857;974751099;985512590;1008813961;971116232;5485152 -250;1181356193;1199890144;1230271423;1254058035;1435951193;1232944413;11502559 -300;1404383088;1451900893;1475425591;1494546592;1530113206;1475832510;8629307 -350;1643973007;1702753553;1723329453;1744498971;1772843227;1720735815;8429278 -400;1883990693;1926251730;1961868018;1998996267;2028847559;1960663941;11520331 -450;2093457553;2160674377;2196177360;2237898969;2337703230;2200014926;13484216 -500;2351931190;2403737744;2440280586;2493890164;2675840385;2451017238;17919723 -550;2620308321;2741547299;2778395572;2804673658;3167646315;2775641001;24014167 -600;2822565959;2984355731;3011144099;3041297126;3117151797;3007385484;17716813 -650;3096633370;3206939671;3257238779;3297084291;3555764011;3251618903;24112459 -700;3353953023;3509161265;3549487091;3584125098;3788453833;3545014072;23459360 -750;3593827025;3725989652;3790618529;3834291360;3942594712;3784587299;22531680 -800;3994363498;4096651433;4161083259;4201211211;4329658181;4156200037;22852870 -850;4245739166;4390972894;4467851413;4545305899;4871212706;4478115175;38396394 -900;4534080926;4728535725;4784857228;4865421026;5009165781;4799001858;29669971 -950;4882368300;5107065209;5150676462;5217475373;5564924455;5155846903;36288606 -1000;5353426320;5517819639;5568789133;5648063473;5825645303;5572898368;27980146 diff --git a/experiments/results/chw-work/TeeTime.csv b/experiments/results/chw-work/TeeTime.csv deleted file mode 100644 index b3e2308cb9f3ebf4382e69a04d3fb4cf5e6c9b05..0000000000000000000000000000000000000000 --- a/experiments/results/chw-work/TeeTime.csv +++ /dev/null @@ -1,20 +0,0 @@ -50;37409870;39712091;40551614;41872681;46981249;40825827;520100 -100;74848886;77594063;79350288;82620526;96710959;80682800;1242332 -150;109509472;113130299;114992028;116545042;141809133;116038733;1445413 -200;149576667;154103932;158648849;160472809;166534204;157647883;1147641 -250;186351044;195045954;197574786;200420541;205740939;197833070;1161424 -300;227567297;236209249;239537372;240841608;254943126;238988007;1273608 -350;263962350;274421694;278554856;282444575;297325268;278963959;1906965 -400;301652197;310932104;318158978;324177268;347633408;318831228;2748566 -450;345764700;350349028;356190792;361479579;374075294;356693717;1938489 -500;385523591;394501763;402854706;409270794;428996087;402743847;2759305 -550;418006345;431712117;437322756;448968927;466004463;440010788;3243488 -600;462762141;478331694;486726100;497015897;513094090;487001266;3464966 -650;498716701;509037287;521511896;527900069;613747728;521387975;4867196 -700;548439432;565718820;571012535;576878519;593948540;571424372;2690897 -750;601339623;610144553;617716268;624627039;641422007;618261584;2674503 -800;622111344;642761960;653135914;658724386;715327919;651870382;4386503 -850;655329758;672637472;688432814;697900331;721996068;686312192;4610008 -900;685596911;721248914;730479558;739256163;760854679;730598323;4593658 -950;750978691;766349140;775656552;781562357;804829657;775844350;3187702 -1000;782708542;811284334;816156850;824923190;847850986;816902190;3685762 diff --git a/experiments/results/evaluation.xlsx b/experiments/results/evaluation.xlsx deleted file mode 100644 index 5a62baf8e4f79279c96fbbb50b562cb8f244eceb..0000000000000000000000000000000000000000 Binary files a/experiments/results/evaluation.xlsx and /dev/null differ diff --git a/experiments/results/overhead-findings.txt b/experiments/results/overhead-findings.txt deleted file mode 100644 index 716448668817907baac6044e2bfc9b8b70f82c48..0000000000000000000000000000000000000000 --- a/experiments/results/overhead-findings.txt +++ /dev/null @@ -1,34 +0,0 @@ -[increases overhead (first is slower)] --for loop with list vs. array (reason: due to new instantiation of iterator) --for loop with super type vs. concrete type (reason: due to less JIT optimization possibilities) --passing by argument vs. instance variable (reason: unknown) --pipe with array vs. single element (reason: unknown) --access via array wrapper vs. array directly -- - -[irrelevant w.r.t. overhead] --foreach vs. index-based iteration --iterative vs. recursive execution --null-check vs. NullObject --AbstractPipe vs. IPipe -- - - -[analysis performance results (50%)] - -2: 7400 ns -8: 1200 ns (iterative; argument/return w/o pipe) -9: 9400 ns (executeWithPorts: queued pipe) -10: 4900 ns (executeWithPorts: single element pipe) - 10: 5400 ns (executeWithPorts: single element pipe; with setReschedulable() after each read) -11: 7400 ns (executeWithPorts: fixed sized pipe) - 11: 8600 ns (executeWithPorts: fixed sized pipe; with CircularArray(int)) - 11: 8200 ns (executeWithPorts: fixed sized pipe; with CircularArray(int) w/o mask) - 11: 7800 ns (executeWithPorts: fixed sized pipe; with setReschedulable() after each read) - 11: 8200 ns (executeWithPorts: fixed sized pipe; with setReschedulable() after each read; non-final elements) - 11: 7800 ns (executeWithPorts: fixed sized pipe; with setReschedulable() after each read; non-final elements; pipeline searches for firstStageIndex) -12: 3300 ns (recursive; argument/return w/o pipe) -13: 3300 ns (recursive; argument/return w/o pipe; w/o pipeline class) -14: 21,000 ns (spsc pipe) -16: 14,500 ns (with distributor thread) -17: 8600 ns (as 16, but with direct feeding of SpScPipe) diff --git a/experiments/scripts/MooBench-cmd/.gitignore b/experiments/scripts/MooBench-cmd/.gitignore deleted file mode 100644 index ceeb05b410818bc6c355257ab68798073b83bb7a..0000000000000000000000000000000000000000 --- a/experiments/scripts/MooBench-cmd/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/tmp diff --git a/experiments/scripts/MooBench-cmd/META-INF/kieker.aop.xml b/experiments/scripts/MooBench-cmd/META-INF/kieker.aop.xml deleted file mode 100644 index 21d93b0ad698128b77dfe0433b4214ac8265fa8d..0000000000000000000000000000000000000000 --- a/experiments/scripts/MooBench-cmd/META-INF/kieker.aop.xml +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.aspectj.org/dtd/aspectj_1_5_0.dtd"> -<aspectj> - <weaver options=""> - <include within="mooBench.monitoredApplication.*"/> - <include within="kieker.monitoring.probe..*"/> - </weaver> - <aspects> - <aspect name="kieker.monitoring.probe.aspectj.flow.operationExecution.FullInstrumentation" /> - </aspects> -</aspectj> diff --git a/experiments/scripts/MooBench-cmd/META-INF/kieker.legacy.aop.xml b/experiments/scripts/MooBench-cmd/META-INF/kieker.legacy.aop.xml deleted file mode 100644 index a3e02fd16fe213174a8dfb2d151d4d0cda093477..0000000000000000000000000000000000000000 --- a/experiments/scripts/MooBench-cmd/META-INF/kieker.legacy.aop.xml +++ /dev/null @@ -1,9 +0,0 @@ -<!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.aspectj.org/dtd/aspectj_1_5_0.dtd"> -<aspectj> - <weaver options=""> - <include within="mooBench.monitoredApplication.*"/> - </weaver> - <aspects> - <aspect name="kieker.monitoring.probe.aspectj.operationExecution.OperationExecutionAspectFull"/> - </aspects> -</aspectj> diff --git a/experiments/scripts/MooBench-cmd/META-INF/kieker.logging.properties b/experiments/scripts/MooBench-cmd/META-INF/kieker.logging.properties deleted file mode 100644 index f98649baf98e11754e888f5e06069b9dba5df31b..0000000000000000000000000000000000000000 --- a/experiments/scripts/MooBench-cmd/META-INF/kieker.logging.properties +++ /dev/null @@ -1,5 +0,0 @@ -handlers = java.util.logging.FileHandler -java.util.logging.FileHandler.level = ALL -java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter -java.util.logging.FileHandler.append = true -java.util.logging.FileHandler.pattern = kieker.log diff --git a/experiments/scripts/MooBench-cmd/META-INF/kieker.monitoring.properties b/experiments/scripts/MooBench-cmd/META-INF/kieker.monitoring.properties deleted file mode 100644 index 52c0d13ef363b598fc1d4c38dd57aad45aadc49f..0000000000000000000000000000000000000000 --- a/experiments/scripts/MooBench-cmd/META-INF/kieker.monitoring.properties +++ /dev/null @@ -1,29 +0,0 @@ -kieker.monitoring.enabled=true -kieker.monitoring.name=KIEKER-BENCHMARK - -kieker.monitoring.adaptiveMonitoring.enabled=false -kieker.monitoring.periodicSensorsExecutorPoolSize=0 - -kieker.monitoring.writer.AsyncDummyWriter.QueueSize=100000 -kieker.monitoring.writer.AsyncDummyWriter.QueueFullBehavior=1 - -kieker.monitoring.writer.filesystem.SyncFsWriter.bufferSize=16777216 -kieker.monitoring.writer.filesystem.SyncFsWriter.flush=false - -kieker.monitoring.writer.filesystem.AsyncFsWriter.QueueSize=100000 -kieker.monitoring.writer.filesystem.AsyncFsWriter.QueueFullBehavior=1 -kieker.monitoring.writer.filesystem.AsyncFsWriter.bufferSize=16777216 -kieker.monitoring.writer.filesystem.AsyncFsWriter.flush=false - -kieker.monitoring.writer.filesystem.AsyncBinaryFsWriter.QueueSize=100000 -kieker.monitoring.writer.filesystem.AsyncBinaryFsWriter.QueueFullBehavior=1 -kieker.monitoring.writer.filesystem.AsyncBinaryFsWriter.bufferSize=16777216 - -kieker.monitoring.writer.filesystem.AsyncBinaryZipWriter.QueueSize=100000 -kieker.monitoring.writer.filesystem.AsyncBinaryZipWriter.QueueFullBehavior=1 -kieker.monitoring.writer.filesystem.AsyncBinaryZipWriter.bufferSize=16777216 - -kieker.monitoring.writer.tcp.TCPWriter.QueueFullBehavior=1 -kieker.monitoring.writer.tcp.TCPWriter.QueueSize=100000 -#kieker.monitoring.writer.tcp.TCPWriter.hostname=blade2 - diff --git a/experiments/scripts/MooBench-cmd/MooBench.jar b/experiments/scripts/MooBench-cmd/MooBench.jar deleted file mode 100644 index 9232679c05b83488fc352c39f0e838e8ca9f551b..0000000000000000000000000000000000000000 Binary files a/experiments/scripts/MooBench-cmd/MooBench.jar and /dev/null differ diff --git a/experiments/scripts/MooBench-cmd/lib/kieker-1.9_aspectj.jar b/experiments/scripts/MooBench-cmd/lib/kieker-1.9_aspectj.jar deleted file mode 100644 index 1eccaeeec73b0737030ce3ba782e3f72209f7eba..0000000000000000000000000000000000000000 Binary files a/experiments/scripts/MooBench-cmd/lib/kieker-1.9_aspectj.jar and /dev/null differ diff --git a/experiments/scripts/MooBench-cmd/startMooBench.cmd b/experiments/scripts/MooBench-cmd/startMooBench.cmd deleted file mode 100644 index 456f122ec63b94ec2551cf5bea7d6dee68fae997..0000000000000000000000000000000000000000 --- a/experiments/scripts/MooBench-cmd/startMooBench.cmd +++ /dev/null @@ -1,16 +0,0 @@ -@echo off - -set runs=%1 -set calls=%2 - -if [%calls%] == [] ( - set calls=1000000 -) - -set cp=.;MooBench.jar;META-INF/kieker.monitoring.properties;META-INF/kieker.logging.properties -set jvmParams=-javaagent:lib/kieker-1.9_aspectj.jar -Dorg.aspectj.weaver.loadtime.configuration=META-INF/kieker.aop.xml -Dorg.aspectj.weaver.showWeaveInfo=true -Daj.weaving.verbose=true -Dkieker.monitoring.writer=kieker.monitoring.writer.tcp.TCPWriter -set params=-d 10 -h 1 -m 0 -t %calls% -o tmp/test.txt -q - -for /l %%i in (1, 1, %runs%) do ( - java -cp %cp% %jvmParams% mooBench.benchmark.Benchmark %params% -) \ No newline at end of file diff --git a/experiments/scripts/MooBench-cmd/startMooBench.sh b/experiments/scripts/MooBench-cmd/startMooBench.sh deleted file mode 100644 index 2d16af84c7c0b9e558936c29e208f3e39448d0c5..0000000000000000000000000000000000000000 --- a/experiments/scripts/MooBench-cmd/startMooBench.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -java=~/jdk1.7.0_60/bin/java -cp=.:MooBench.jar:META-INF/kieker.monitoring.properties:META-INF/kieker.logging.properties -jvmParams="-javaagent:lib/kieker-1.9_aspectj.jar -Dorg.aspectj.weaver.loadtime.configuration=META-INF/kieker.aop.xml -Dorg.aspectj.weaver.showWeaveInfo=true -Daj.weaving.verbose=true -Dkieker.monitoring.writer=kieker.monitoring.writer.tcp.TCPWriter" -params="-d 10 -h 1 -m 0 -t 1000000 -o tmp/test.txt -q" -#runs=$1 - -for i in {1..3}; do - ${java} -cp ${cp} ${jvmParams} mooBench.benchmark.Benchmark ${params}; -done diff --git a/experiments/scripts/benchmark-kieker-days-ffi.sh b/experiments/scripts/benchmark-kieker-days-ffi.sh deleted file mode 100644 index 711dc92dd7cb37ecc1d9944d0d9d54a44c924412..0000000000000000000000000000000000000000 --- a/experiments/scripts/benchmark-kieker-days-ffi.sh +++ /dev/null @@ -1,251 +0,0 @@ -#!/bin/bash - -JAVABIN="/localhome/chw/jdk1.7.0_60/bin/" - -RSCRIPTDIR=bin/icpe/r/ -BASEDIR=./ -RESULTSDIR="${BASEDIR}tmp/results-benchmark-kieker-days-ffi/" - -SLEEPTIME=30 ## 30 -NUM_LOOPS=1 ## 10 -THREADS=1 ## 1 -RECURSIONDEPTH=10 ## 10 -TOTALCALLS=20000 ## 20000000 -METHODTIME=0 ## 0 - -MOREPARAMS="" -#MOREPARAMS="--quickstart" - -TIME=`expr ${METHODTIME} \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} + ${SLEEPTIME} \* 4 \* ${NUM_LOOPS} \* ${RECURSIONDEPTH} + 50 \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} ` -echo "Experiment will take circa ${TIME} seconds." - -echo "Removing and recreating '$RESULTSDIR'" -(rm -rf ${RESULTSDIR}) && mkdir ${RESULTSDIR} -mkdir ${RESULTSDIR}stat/ - -RAWFN="${RESULTSDIR}raw" - -JAVAARGS="-server" -JAVAARGS="${JAVAARGS} -d64" -JAVAARGS="${JAVAARGS} -Xms1G -Xmx4G" -JAVAARGS="${JAVAARGS} -verbose:gc -XX:+PrintCompilation" -#JAVAARGS="${JAVAARGS} -XX:+PrintInlining" -#JAVAARGS="${JAVAARGS} -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation" -#JAVAARGS="${JAVAARGS} -Djava.compiler=NONE" -JARNoInstru="-jar dist/OverheadEvaluationMicrobenchmarkTCPffiNoInstru.jar" -JARDeactived="-jar dist/OverheadEvaluationMicrobenchmarkTCPffiDeactivated.jar" -JARCollecting="-jar dist/OverheadEvaluationMicrobenchmarkTCPffiCollecting.jar" -JARNORMAL="-jar dist/OverheadEvaluationMicrobenchmarkTCPffiNormal.jar" - -JAVAARGS_NOINSTR="${JAVAARGS}" -JAVAARGS_LTW="${JAVAARGS} -javaagent:${BASEDIR}lib/aspectjweaver.jar -Dorg.aspectj.weaver.showWeaveInfo=false -Daj.weaving.verbose=false -Dorg.aspectj.weaver.loadtime.configuration=META-INF/kieker-overhead-benchmark.aop.xml" - -## Write configuration -uname -a >${RESULTSDIR}configuration.txt -${JAVABIN}java ${JAVAARGS} -version 2>>${RESULTSDIR}configuration.txt -echo "JAVAARGS: ${JAVAARGS}" >>${RESULTSDIR}configuration.txt -echo "" >>${RESULTSDIR}configuration.txt -echo "Runtime: circa ${TIME} seconds" >>${RESULTSDIR}configuration.txt -echo "" >>${RESULTSDIR}configuration.txt -echo "SLEEPTIME=${SLEEPTIME}" >>${RESULTSDIR}configuration.txt -echo "NUM_LOOPS=${NUM_LOOPS}" >>${RESULTSDIR}configuration.txt -echo "TOTALCALLS=${TOTALCALLS}" >>${RESULTSDIR}configuration.txt -echo "METHODTIME=${METHODTIME}" >>${RESULTSDIR}configuration.txt -echo "THREADS=${THREADS}" >>${RESULTSDIR}configuration.txt -echo "RECURSIONDEPTH=${RECURSIONDEPTH}" >>${RESULTSDIR}configuration.txt -sync - -## Execute Benchmark - -for ((i=1;i<=${NUM_LOOPS};i+=1)); do - j=${RECURSIONDEPTH} - k=0 - echo "## Starting iteration ${i}/${NUM_LOOPS}" - - # No instrumentation - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} No instrumentation" - sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & - ${JAVABIN}java ${JAVAARGS_NOINSTR} ${JARNoInstru} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %sar - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - sync - sleep ${SLEEPTIME} - - # Deactivated Probe - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Deactivated Probe" - sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & - ${JAVABIN}java -jar dist/explorviz_worker.jar >${RESULTSDIR}worker-${i}-${j}-${k}.log & - sleep 5 - ${JAVABIN}java ${JAVAARGS_LTW} ${JARDeactived} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %sar - pkill -f 'java -jar' - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - sync - sleep ${SLEEPTIME} - - # Collecting - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Collecting" - sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & - ${JAVABIN}java -jar dist/explorviz_worker.jar >${RESULTSDIR}worker-${i}-${j}-${k}.log & - sleep 5 - ${JAVABIN}java ${JAVAARGS_LTW} ${JARCollecting} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %sar - pkill -f 'java -jar' - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - sync - sleep ${SLEEPTIME} - - # Logging - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Logging" - sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & - ${JAVABIN}java -jar dist/explorviz_worker.jar >${RESULTSDIR}worker-${i}-${j}-${k}.log & - sleep 5 - ${JAVABIN}java ${JAVAARGS_LTW} ${JARNORMAL} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %sar - pkill -f 'java -jar' - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - sync - sleep ${SLEEPTIME} - - # Reconstruction - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Reconstruction" - sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & - ${JAVABIN}java -jar dist/explorviz_workerReconstruction.jar >${RESULTSDIR}worker-${i}-${j}-${k}.log & - sleep 5 - ${JAVABIN}java ${JAVAARGS_LTW} ${JARNORMAL} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %sar - pkill -f 'java -jar' - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - sync - sleep ${SLEEPTIME} - - # Reduction - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Reduction" - sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & - ${JAVABIN}java -jar dist/explorviz_workerReduction.jar >${RESULTSDIR}worker-${i}-${j}-${k}.log & - sleep 5 - ${JAVABIN}java ${JAVAARGS_LTW} ${JARNORMAL} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %sar - pkill -f 'java -jar' - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - sync - sleep ${SLEEPTIME} - -done -zip -jqr ${RESULTSDIR}stat.zip ${RESULTSDIR}stat -rm -rf ${RESULTSDIR}stat/ -[ -f ${RESULTSDIR}hotspot-1-${RECURSIONDEPTH}-1.log ] && grep "<task " ${RESULTSDIR}hotspot-*.log >${RESULTSDIR}log.log -[ -f ${BASEDIR}errorlog.txt ] && mv ${BASEDIR}errorlog.txt ${RESULTSDIR} - -## Generate Results file -# Timeseries -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-timeseries.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -tsconf.min=(${METHODTIME}/1000) -tsconf.max=(${METHODTIME}/1000)+40 -source("${RSCRIPTDIR}timeseries.r") -EOF -# Timeseries-Average -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-timeseries-average.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -tsconf.min=(${METHODTIME}/1000) -tsconf.max=(${METHODTIME}/1000)+40 -source("${RSCRIPTDIR}timeseries-average.r") -EOF -# Throughput -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-throughput.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -source("${RSCRIPTDIR}throughput.r") -EOF -# Throughput-Average -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-throughput-average.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -source("${RSCRIPTDIR}throughput-average.r") -EOF -# Bars -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-bars.pdf" -outtxt_fn="${RESULTSDIR}results-text.txt" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -results.count=${TOTALCALLS} -results.skip=${TOTALCALLS}/2 -bars.minval=(${METHODTIME}/1000) -bars.maxval=(${METHODTIME}/1000)+40 -source("${RSCRIPTDIR}bar.r") -EOF - -## Clean up raw results -zip -jqr ${RESULTSDIR}results.zip ${RAWFN}* -rm -f ${RAWFN}* -zip -jqr ${RESULTSDIR}worker.zip ${RESULTSDIR}worker*.log -rm -f ${RESULTSDIR}worker*.log -[ -f ${BASEDIR}nohup.out ] && mv ${BASEDIR}nohup.out ${RESULTSDIR} diff --git a/experiments/scripts/benchmark-kieker-days-kieker.sh b/experiments/scripts/benchmark-kieker-days-kieker.sh deleted file mode 100644 index 978a180f55b10f1a65090c6867654d067fc31be7..0000000000000000000000000000000000000000 --- a/experiments/scripts/benchmark-kieker-days-kieker.sh +++ /dev/null @@ -1,303 +0,0 @@ -#!/bin/bash - -JAVABIN="/localhome/chw/jdk1.7.0_60/bin/" - -RSCRIPTDIR=bin/icpe/r/ -BASEDIR=./ -RESULTSDIR="${BASEDIR}tmp/results-benchmark-kieker-days-kieker/" - -compressCmd="zip -jqr" -compressExt="zip" -#compressCmd="tar cfv" -#compressExt="tar" - -SLEEPTIME=30 ## 30 -NUM_LOOPS=1 ## 10 -THREADS=1 ## 1 -RECURSIONDEPTH=10 ## 10 -TOTALCALLS=20000 ## 20000000 -METHODTIME=0 ## 0 - -#MOREPARAMS="" -MOREPARAMS="--quickstart" - -TIME=`expr ${METHODTIME} \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} + ${SLEEPTIME} \* 4 \* ${NUM_LOOPS} \* ${RECURSIONDEPTH} + 50 \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} ` -echo "Experiment will take circa ${TIME} seconds." - -echo "Removing and recreating '$RESULTSDIR'" -(rm -rf ${RESULTSDIR}) && mkdir ${RESULTSDIR} -mkdir ${RESULTSDIR}stat/ - -# Clear kieker.log and initialize logging -rm -f ${BASEDIR}kieker.log -touch ${BASEDIR}kieker.log - -RAWFN="${RESULTSDIR}raw" - -JAVAARGS="-server" -JAVAARGS="${JAVAARGS} -d64" -JAVAARGS="${JAVAARGS} -Xms1G -Xmx4G" -JAVAARGS="${JAVAARGS} -verbose:gc -XX:+PrintCompilation" -#JAVAARGS="${JAVAARGS} -XX:+PrintInlining" -#JAVAARGS="${JAVAARGS} -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation" -#JAVAARGS="${JAVAARGS} -Djava.compiler=NONE" -JAR="-jar dist/OverheadEvaluationMicrobenchmarkKieker.jar" - -JAVAARGS_NOINSTR="${JAVAARGS}" -JAVAARGS_LTW="${JAVAARGS} -javaagent:${BASEDIR}lib/kieker-1.10-SNAPSHOT_aspectj.jar -Dorg.aspectj.weaver.showWeaveInfo=false -Daj.weaving.verbose=false -Dkieker.monitoring.adaptiveMonitoring.enabled=false -Dorg.aspectj.weaver.loadtime.configuration=META-INF/kieker.aop.xml" -JAVAARGS_KIEKER_DEACTV="${JAVAARGS_LTW} -Dkieker.monitoring.enabled=false -Dkieker.monitoring.writer=kieker.monitoring.writer.DummyWriter" -JAVAARGS_KIEKER_NOLOGGING="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.DummyWriter" -JAVAARGS_KIEKER_LOGGING="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.tcp.TCPWriter -Dkieker.monitoring.writer.tcp.TCPWriter.QueueSize=100000 -Dkieker.monitoring.writer.tcp.TCPWriter.QueueFullBehavior=1 -Dkieker.monitoring.writer.tcp.TCPWriter.hostname=localhost" - -## Write configuration -uname -a >${RESULTSDIR}configuration.txt -${JAVABIN}java ${JAVAARGS} -version 2>>${RESULTSDIR}configuration.txt -echo "JAVAARGS: ${JAVAARGS}" >>${RESULTSDIR}configuration.txt -echo "" >>${RESULTSDIR}configuration.txt -echo "Runtime: circa ${TIME} seconds" >>${RESULTSDIR}configuration.txt -echo "" >>${RESULTSDIR}configuration.txt -echo "SLEEPTIME=${SLEEPTIME}" >>${RESULTSDIR}configuration.txt -echo "NUM_LOOPS=${NUM_LOOPS}" >>${RESULTSDIR}configuration.txt -echo "TOTALCALLS=${TOTALCALLS}" >>${RESULTSDIR}configuration.txt -echo "METHODTIME=${METHODTIME}" >>${RESULTSDIR}configuration.txt -echo "THREADS=${THREADS}" >>${RESULTSDIR}configuration.txt -echo "RECURSIONDEPTH=${RECURSIONDEPTH}" >>${RESULTSDIR}configuration.txt -sync - -## Execute Benchmark -for ((i=1;i<=${NUM_LOOPS};i+=1)); do - j=${RECURSIONDEPTH} - k=0 - echo "## Starting iteration ${i}/${NUM_LOOPS}" - echo "## Starting iteration ${i}/${NUM_LOOPS}" >>${BASEDIR}kieker.log - - # No instrumentation - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} No instrumentation" - echo " # ${i}.${j}.${k} No instrumentation" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java ${JAVAARGS_NOINSTR} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - - # Deactivated probe - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Deactivated probe" - echo " # ${i}.${j}.${k} Deactivated probe" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java ${JAVAARGS_KIEKER_DEACTV} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - - # No logging - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} No logging (null writer)" - echo " # ${i}.${j}.${k} No logging (null writer)" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java ${JAVAARGS_KIEKER_NOLOGGING} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - - # Logging - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Logging" - echo " # ${i}.${j}.${k} Logging" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java -jar dist/KiekerTCPReader1.jar 2>${RESULTSDIR}worker-${i}-${j}-${k}.log & - sleep 5 - ${JAVABIN}java ${JAVAARGS_KIEKER_LOGGING} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - pkill -f 'java -jar' - rm -rf ${BASEDIR}tmp/kieker-* - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - - # Reconstruction - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Logging" - echo " # ${i}.${j}.${k} Logging" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java -jar dist/KiekerTCPReader2.jar 2>${RESULTSDIR}worker-${i}-${j}-${k}.log & - sleep 5 - ${JAVABIN}java ${JAVAARGS_KIEKER_LOGGING} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - pkill -f 'java -jar' - rm -rf ${BASEDIR}tmp/kieker-* - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - - # Reduction - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Logging" - echo " # ${i}.${j}.${k} Logging" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java -jar dist/KiekerTCPReader3.jar 2>${RESULTSDIR}worker-${i}-${j}-${k}.log & - sleep 5 - ${JAVABIN}java ${JAVAARGS_KIEKER_LOGGING} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - pkill -f 'java -jar' - rm -rf ${BASEDIR}tmp/kieker-* - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - -done -#zip -jqr ${RESULTSDIR}stat.zip ${RESULTSDIR}stat -${compressCmd} ${RESULTSDIR}stat.${compressExt} ${RESULTSDIR}stat -rm -rf ${RESULTSDIR}stat/ -mv ${BASEDIR}kieker.log ${RESULTSDIR}kieker.log -[ -f ${RESULTSDIR}hotspot-1-${RECURSIONDEPTH}-1.log ] && grep "<task " ${RESULTSDIR}hotspot-*.log >${RESULTSDIR}log.log -[ -f ${BASEDIR}errorlog.txt ] && mv ${BASEDIR}errorlog.txt ${RESULTSDIR} - -## Generate Results file -# Timeseries -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-timeseries.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -tsconf.min=(${METHODTIME}/1000) -tsconf.max=(${METHODTIME}/1000)+40 -source("${RSCRIPTDIR}timeseries.r") -EOF -# Timeseries-Average -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-timeseries-average.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -tsconf.min=(${METHODTIME}/1000) -tsconf.max=(${METHODTIME}/1000)+40 -source("${RSCRIPTDIR}timeseries-average.r") -EOF -# Throughput -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-throughput.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -source("${RSCRIPTDIR}throughput.r") -EOF -# Throughput-Average -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-throughput-average.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -source("${RSCRIPTDIR}throughput-average.r") -EOF -# Bars -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-bars.pdf" -outtxt_fn="${RESULTSDIR}results-text.txt" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -results.count=${TOTALCALLS} -results.skip=${TOTALCALLS}/2 -bars.minval=(${METHODTIME}/1000) -bars.maxval=(${METHODTIME}/1000)+40 -source("${RSCRIPTDIR}bar.r") -EOF - -## Clean up raw results -#zip -jqr ${RESULTSDIR}results.zip ${RAWFN}* -${compressCmd} ${RESULTSDIR}results.${compressExt} ${RAWFN}* -rm -f ${RAWFN}* -#zip -jqr ${RESULTSDIR}worker.zip ${RESULTSDIR}worker*.log -${compressCmd} ${RESULTSDIR}worker.${compressExt} ${RESULTSDIR}worker*.log -rm -f ${RESULTSDIR}worker*.log -[ -f ${BASEDIR}nohup.out ] && mv ${BASEDIR}nohup.out ${RESULTSDIR} diff --git a/experiments/scripts/benchmark-kieker-days-teetime.sh b/experiments/scripts/benchmark-kieker-days-teetime.sh deleted file mode 100644 index baaf9932ef6631094dc71f85d8aeb7bcba0dfd33..0000000000000000000000000000000000000000 --- a/experiments/scripts/benchmark-kieker-days-teetime.sh +++ /dev/null @@ -1,305 +0,0 @@ -#!/bin/bash - -JAVABIN="/localhome/chw/jdk1.7.0_60/bin/" - -RSCRIPTDIR=bin/icpe/r/ -BASEDIR=./ -RESULTSDIR="${BASEDIR}tmp/results-benchmark-kieker-days-teetime/" - -TEETIME_CLASSPATH="dist/teetime.jar:lib/teetime/*" - -compressCmd="zip -jqr" -compressExt="zip" -#compressCmd="tar cfv" -#compressExt="tar" - -SLEEPTIME=30 ## 30 -NUM_LOOPS=1 ## 10 -THREADS=1 ## 1 -RECURSIONDEPTH=10 ## 10 -TOTALCALLS=20000 ## 20000000 -METHODTIME=0 ## 0 - -#MOREPARAMS="" -MOREPARAMS="--quickstart" - -TIME=`expr ${METHODTIME} \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} + ${SLEEPTIME} \* 4 \* ${NUM_LOOPS} \* ${RECURSIONDEPTH} + 50 \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} ` -echo "Experiment will take circa ${TIME} seconds." - -echo "Removing and recreating '$RESULTSDIR'" -(rm -rf ${RESULTSDIR}) && mkdir ${RESULTSDIR} -mkdir ${RESULTSDIR}stat/ - -# Clear kieker.log and initialize logging -rm -f ${BASEDIR}kieker.log -touch ${BASEDIR}kieker.log - -RAWFN="${RESULTSDIR}raw" - -JAVAARGS="-server" -JAVAARGS="${JAVAARGS} -d64" -JAVAARGS="${JAVAARGS} -Xms1G -Xmx4G" -JAVAARGS="${JAVAARGS} -verbose:gc -XX:+PrintCompilation" -#JAVAARGS="${JAVAARGS} -XX:+PrintInlining" -#JAVAARGS="${JAVAARGS} -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation" -#JAVAARGS="${JAVAARGS} -Djava.compiler=NONE" -JAR="-jar dist/OverheadEvaluationMicrobenchmarkKieker.jar" - -JAVAARGS_NOINSTR="${JAVAARGS}" -JAVAARGS_LTW="${JAVAARGS} -javaagent:${BASEDIR}lib/kieker-1.10-SNAPSHOT_aspectj.jar -Dorg.aspectj.weaver.showWeaveInfo=false -Daj.weaving.verbose=false -Dkieker.monitoring.adaptiveMonitoring.enabled=false -Dorg.aspectj.weaver.loadtime.configuration=META-INF/kieker.aop.xml" -JAVAARGS_KIEKER_DEACTV="${JAVAARGS_LTW} -Dkieker.monitoring.enabled=false -Dkieker.monitoring.writer=kieker.monitoring.writer.DummyWriter" -JAVAARGS_KIEKER_NOLOGGING="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.DummyWriter" -JAVAARGS_KIEKER_LOGGING="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.tcp.TCPWriter -Dkieker.monitoring.writer.tcp.TCPWriter.QueueSize=100000 -Dkieker.monitoring.writer.tcp.TCPWriter.QueueFullBehavior=1" - -## Write configuration -uname -a >${RESULTSDIR}configuration.txt -${JAVABIN}java ${JAVAARGS} -version 2>>${RESULTSDIR}configuration.txt -echo "JAVAARGS: ${JAVAARGS}" >>${RESULTSDIR}configuration.txt -echo "" >>${RESULTSDIR}configuration.txt -echo "Runtime: circa ${TIME} seconds" >>${RESULTSDIR}configuration.txt -echo "" >>${RESULTSDIR}configuration.txt -echo "SLEEPTIME=${SLEEPTIME}" >>${RESULTSDIR}configuration.txt -echo "NUM_LOOPS=${NUM_LOOPS}" >>${RESULTSDIR}configuration.txt -echo "TOTALCALLS=${TOTALCALLS}" >>${RESULTSDIR}configuration.txt -echo "METHODTIME=${METHODTIME}" >>${RESULTSDIR}configuration.txt -echo "THREADS=${THREADS}" >>${RESULTSDIR}configuration.txt -echo "RECURSIONDEPTH=${RECURSIONDEPTH}" >>${RESULTSDIR}configuration.txt -sync - -## Execute Benchmark -for ((i=1;i<=${NUM_LOOPS};i+=1)); do - j=${RECURSIONDEPTH} - k=0 - echo "## Starting iteration ${i}/${NUM_LOOPS}" - echo "## Starting iteration ${i}/${NUM_LOOPS}" >>${BASEDIR}kieker.log - - # No instrumentation - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} No instrumentation" - echo " # ${i}.${j}.${k} No instrumentation" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java ${JAVAARGS_NOINSTR} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - - # Deactivated probe - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Deactivated probe" - echo " # ${i}.${j}.${k} Deactivated probe" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java ${JAVAARGS_KIEKER_DEACTV} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - - # No logging - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} No logging (null writer)" - echo " # ${i}.${j}.${k} No logging (null writer)" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java ${JAVAARGS_KIEKER_NOLOGGING} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - - # Logging - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Logging" - echo " # ${i}.${j}.${k} Logging" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java -cp ${TEETIME_CLASSPATH} teetime.variant.methodcallWithPorts.examples.kiekerdays.TcpTraceLogging 2>${RESULTSDIR}worker-${i}-${j}-${k}.log & - sleep 5 - ${JAVABIN}java ${JAVAARGS_KIEKER_LOGGING} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - pkill -f 'java -jar' - rm -rf ${BASEDIR}tmp/kieker-* - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - - # Reconstruction - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Logging" - echo " # ${i}.${j}.${k} Logging" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java -cp ${TEETIME_CLASSPATH} teetime.variant.methodcallWithPorts.examples.kiekerdays.TcpTraceReconstruction 1 2>${RESULTSDIR}worker-${i}-${j}-${k}.log & - sleep 5 - ${JAVABIN}java ${JAVAARGS_KIEKER_LOGGING} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - pkill -f 'java -jar' - rm -rf ${BASEDIR}tmp/kieker-* - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - - # Reduction - k=`expr ${k} + 1` - echo " # ${i}.${j}.${k} Logging" - echo " # ${i}.${j}.${k} Logging" >>${BASEDIR}kieker.log - mpstat 1 > ${RESULTSDIR}stat/mpstat-${i}-${j}-${k}.txt & - vmstat 1 > ${RESULTSDIR}stat/vmstat-${i}-${j}-${k}.txt & - iostat -xn 10 > ${RESULTSDIR}stat/iostat-${i}-${j}-${k}.txt & - ${JAVABIN}java -cp ${TEETIME_CLASSPATH} teetime.variant.methodcallWithPorts.examples.kiekerdays.TcpTraceReduction 1 2>${RESULTSDIR}worker-${i}-${j}-${k}.log & - sleep 5 - ${JAVABIN}java ${JAVAARGS_KIEKER_LOGGING} ${JAR} \ - --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ - --totalcalls ${TOTALCALLS} \ - --methodtime ${METHODTIME} \ - --totalthreads ${THREADS} \ - --recursiondepth ${j} \ - ${MOREPARAMS} - kill %mpstat - kill %vmstat - kill %iostat - pkill -f 'java -jar' - rm -rf ${BASEDIR}tmp/kieker-* - [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log - echo >>${BASEDIR}kieker.log - echo >>${BASEDIR}kieker.log - sync - sleep ${SLEEPTIME} - -done -#zip -jqr ${RESULTSDIR}stat.zip ${RESULTSDIR}stat -${compressCmd} ${RESULTSDIR}stat.${compressExt} ${RESULTSDIR}stat -rm -rf ${RESULTSDIR}stat/ -mv ${BASEDIR}kieker.log ${RESULTSDIR}kieker.log -[ -f ${RESULTSDIR}hotspot-1-${RECURSIONDEPTH}-1.log ] && grep "<task " ${RESULTSDIR}hotspot-*.log >${RESULTSDIR}log.log -[ -f ${BASEDIR}errorlog.txt ] && mv ${BASEDIR}errorlog.txt ${RESULTSDIR} - -## Generate Results file -# Timeseries -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-timeseries.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -tsconf.min=(${METHODTIME}/1000) -tsconf.max=(${METHODTIME}/1000)+40 -source("${RSCRIPTDIR}timeseries.r") -EOF -# Timeseries-Average -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-timeseries-average.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -tsconf.min=(${METHODTIME}/1000) -tsconf.max=(${METHODTIME}/1000)+40 -source("${RSCRIPTDIR}timeseries-average.r") -EOF -# Throughput -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-throughput.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -source("${RSCRIPTDIR}throughput.r") -EOF -# Throughput-Average -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-throughput-average.pdf" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -configs.colors=c("black","red","blue","green","yellow","purple") -results.count=${TOTALCALLS} -source("${RSCRIPTDIR}throughput-average.r") -EOF -# Bars -R --vanilla --silent <<EOF -results_fn="${RAWFN}" -output_fn="${RESULTSDIR}results-bars.pdf" -outtxt_fn="${RESULTSDIR}results-text.txt" -configs.loop=${NUM_LOOPS} -configs.recursion=c(${RECURSIONDEPTH}) -configs.labels=c("No Probe","Deactivated Probe","Collecting Data","TCP Writer","Reconstruction","Reduction") -results.count=${TOTALCALLS} -results.skip=${TOTALCALLS}/2 -bars.minval=(${METHODTIME}/1000) -bars.maxval=(${METHODTIME}/1000)+40 -source("${RSCRIPTDIR}bar.r") -EOF - -## Clean up raw results -#zip -jqr ${RESULTSDIR}results.zip ${RAWFN}* -${compressCmd} ${RESULTSDIR}results.${compressExt} ${RAWFN}* -rm -f ${RAWFN}* -#zip -jqr ${RESULTSDIR}worker.zip ${RESULTSDIR}worker*.log -${compressCmd} ${RESULTSDIR}worker.${compressExt} ${RESULTSDIR}worker*.log -rm -f ${RESULTSDIR}worker*.log -[ -f ${BASEDIR}nohup.out ] && mv ${BASEDIR}nohup.out ${RESULTSDIR} diff --git a/experiments/scripts/teetime-cmd/lib/kieker-1.9_aspectj.jar b/experiments/scripts/teetime-cmd/lib/kieker-1.9_aspectj.jar deleted file mode 100644 index 1eccaeeec73b0737030ce3ba782e3f72209f7eba..0000000000000000000000000000000000000000 Binary files a/experiments/scripts/teetime-cmd/lib/kieker-1.9_aspectj.jar and /dev/null differ diff --git a/experiments/scripts/teetime-cmd/startTeetime.cmd b/experiments/scripts/teetime-cmd/startTeetime.cmd deleted file mode 100644 index 32fa1e1274745c3173662acefb8a0787a7399c56..0000000000000000000000000000000000000000 --- a/experiments/scripts/teetime-cmd/startTeetime.cmd +++ /dev/null @@ -1,6 +0,0 @@ - -set cp=.;teetime.jar;lib/kieker-1.9_aspectj.jar -set jvmParams= -set params= - -java -cp %cp% %jvmParams% teetime.variant.methodcallWithPorts.examples.traceReconstructionWithThreads.ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest %params% \ No newline at end of file diff --git a/experiments/scripts/teetime-cmd/startTeetime.sh b/experiments/scripts/teetime-cmd/startTeetime.sh deleted file mode 100644 index 95bf69d0f8034468412441beb94d975c08b4836b..0000000000000000000000000000000000000000 --- a/experiments/scripts/teetime-cmd/startTeetime.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -java=~/jdk1.7.0_60/bin/java -cp=.:teetime.jar:lib/kieker-1.9_aspectj.jar -jvmParams="" -params= - -JAVAARGS="-server" -JAVAARGS="${JAVAARGS} -d64" -JAVAARGS="${JAVAARGS} -Xms1G -Xmx1G" -JAVAARGS="${JAVAARGS} -verbose:gc -XX:+PrintCompilation" - -${java} ${JAVAARGS} ${jvmParams} -cp ${cp} teetime.variant.methodcallWithPorts.examples.traceReconstructionWithThreads.ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest ${params} \ No newline at end of file diff --git a/experiments/scripts/teetime-cmd/teetime.jar b/experiments/scripts/teetime-cmd/teetime.jar deleted file mode 100644 index 65e8cda195a9bbfba2036f1c948757c9e0ea914e..0000000000000000000000000000000000000000 Binary files a/experiments/scripts/teetime-cmd/teetime.jar and /dev/null differ diff --git a/src/performancetest/java/teetime/examples/ChwHomeComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/ChwHomeComparisonMethodcallWithPorts.java deleted file mode 100644 index 839ce264e1b990059aeb0b46ecad789f952d12b9..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/ChwHomeComparisonMethodcallWithPorts.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples; - -import static org.junit.Assert.assertEquals; - -import java.util.Map; -import java.util.Map.Entry; - -import teetime.util.test.eval.PerformanceResult; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceTest; - -public class ChwHomeComparisonMethodcallWithPorts extends AbstractProfiledPerformanceAssertion { - - @Override - public String getCorrespondingPerformanceProfile() { - return HostName.CHW_HOME.toString(); - } - - @Override - public void check() { - Map<String, PerformanceResult> performanceResults = PerformanceTest.measurementRepository.performanceResults; - for (Entry<String, PerformanceResult> entry : performanceResults.entrySet()) { - System.out.println("---> " + entry.getKey() + "\n" + entry.getValue()); - } - - PerformanceResult test1 = performanceResults - .get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)"); - PerformanceResult test15 = performanceResults - .get("testWithManyObjects(teetime.examples.experiment15.MethodCallThoughputTimestampAnalysis15Test)"); - PerformanceResult test19a = performanceResults - .get("testWithManyObjectsAnd1Thread(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)"); - PerformanceResult test19b = performanceResults - .get("testWithManyObjectsAnd2Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)"); - PerformanceResult test19c = performanceResults - .get("testWithManyObjectsAnd4Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)"); - - double value15 = (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5); - - System.out.println("value15: " + value15); - - // until 25.06.2014 (incl.) - // assertEquals(44, (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); - // assertEquals(39, (double) test17.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); - - // since 26.06.2014 (incl.) - // assertEquals(44, value15, 4.1); // +0 - // assertEquals(53, value17, 4.1); // +14 - - // // since 04.07.2014 (incl.) - // assertEquals(44, value15, 4.1); // +0 - // assertEquals(53, value17, 4.1); // +0 - - // since 11.08.2014 (incl.) - // assertEquals(44, value15, 4.1); // +0 - // assertEquals(53, value17, 4.1); // +0 - - // since 31.08.2014 (incl.) - // assertEquals(68, value15, 4.1); // +24 - // assertEquals(75, value17, 4.1); // +22 - - // since 04.11.2014 (incl.) - // assertEquals(40, value15, 4.1); // -28 - // assertEquals(78, value17, 4.1); // +3 - - // since 13.12.2014 (incl.) - // assertEquals(40, value15, 4.1); // -28 - // assertEquals(43, value17, 4.1); // -35 - - // since 28.12.2014 (incl.) - assertEquals(30, value15, 4.1); // -10 - - // check speedup - assertEquals(2, (double) test19a.overallDurationInNs / test19b.overallDurationInNs, 0.3); - assertEquals(2, (double) test19b.overallDurationInNs / test19c.overallDurationInNs, 0.3); - } - -} diff --git a/src/performancetest/java/teetime/examples/ChwWorkComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/ChwWorkComparisonMethodcallWithPorts.java deleted file mode 100644 index 357300fe055a0efc5e9dc5ba1f97b7a4dd531298..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/ChwWorkComparisonMethodcallWithPorts.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples; - -import static org.junit.Assert.assertEquals; - -import java.util.Map; -import java.util.Map.Entry; - -import teetime.util.test.eval.PerformanceResult; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceTest; - -public class ChwWorkComparisonMethodcallWithPorts extends AbstractProfiledPerformanceAssertion { - - @Override - public String getCorrespondingPerformanceProfile() { - return HostName.CHW_WORK.toString(); - } - - @Override - public void check() { - Map<String, PerformanceResult> performanceResults = PerformanceTest.measurementRepository.performanceResults; - for (Entry<String, PerformanceResult> entry : performanceResults.entrySet()) { - System.out.println("---> " + entry.getKey() + "\n" + entry.getValue()); - } - - PerformanceResult test1 = performanceResults - .get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)"); - PerformanceResult test15 = performanceResults - .get("testWithManyObjects(teetime.examples.experiment15.MethodCallThoughputTimestampAnalysis15Test)"); - PerformanceResult test19a = performanceResults - .get("testWithManyObjectsAnd1Thread(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)"); - PerformanceResult test19b = performanceResults - .get("testWithManyObjectsAnd2Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)"); - PerformanceResult test19c = performanceResults - .get("testWithManyObjectsAnd4Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)"); - - double value15 = (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5); - - System.out.println("value15: " + value15); - - // until 25.06.2014 (incl.) - // assertEquals(44, (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); - // assertEquals(39, (double) test17.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); - - // since 26.06.2014 (incl.) - // assertEquals(44, value15, 4.1); // +0 - // assertEquals(53, value17, 4.1); // +14 - - // since 04.07.2014 (incl.) - // assertEquals(44, value15, 4.1); // +0 - // assertEquals(53, value17, 4.1); // +0 - - // since 27.08.2014 (incl.) - // assertEquals(44, value15, 4.1); // +0 - // assertEquals(53, value17, 4.1); // +0 - - // since 14.10.2014 (incl.) - assertEquals(36, value15, 4.1); // -8 - // assertEquals(46, value17, 4.1); // -7 - - // below results vary too much, possibly due to the OS' scheduler - // assertEquals(RESULT_TESTS_16, (double) test16a.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // assertEquals(RESULT_TESTS_16, (double) test16b.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // assertEquals(RESULT_TESTS_16, (double) test16c.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // - // assertEquals(RESULT_TESTS_19, (double) test19a.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // assertEquals(RESULT_TESTS_19, (double) test19b.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // assertEquals(RESULT_TESTS_19, (double) test19c.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - - // check speedup - assertEquals(2, (double) test19a.overallDurationInNs / test19b.overallDurationInNs, 0.3); - assertEquals(2.5, (double) test19a.overallDurationInNs / test19c.overallDurationInNs, 0.3); - } - -} diff --git a/src/performancetest/java/teetime/examples/ComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/ComparisonMethodcallWithPorts.java deleted file mode 100644 index 10e04773a1159a0c5b158b14664028e66232d703..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/ComparisonMethodcallWithPorts.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -import teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test; -import teetime.examples.experiment09pipeimpls.MethodCallThoughputTimestampAnalysis9Test; -import teetime.examples.experiment11.MethodCallThoughputTimestampAnalysis11Test; -import teetime.examples.experiment15.MethodCallThoughputTimestampAnalysis15Test; -import teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test; -import teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceCheckProfileRepository; - -@RunWith(Suite.class) -@SuiteClasses({ - MethodCallThoughputTimestampAnalysis1Test.class, - MethodCallThoughputTimestampAnalysis9Test.class, - MethodCallThoughputTimestampAnalysis11Test.class, - MethodCallThoughputTimestampAnalysis15Test.class, - MethodCallThoughputTimestampAnalysis16Test.class, - MethodCallThoughputTimestampAnalysis19Test.class, -}) -public class ComparisonMethodcallWithPorts { - - @BeforeClass - public static void beforeClass() { - // System.setProperty("logback.configurationFile", "src/test/resources/logback.groovy"); - PerformanceCheckProfileRepository.INSTANCE.register(ComparisonMethodcallWithPorts.class, new ChwWorkComparisonMethodcallWithPorts()); - PerformanceCheckProfileRepository.INSTANCE.register(ComparisonMethodcallWithPorts.class, new ChwHomeComparisonMethodcallWithPorts()); - PerformanceCheckProfileRepository.INSTANCE.register(ComparisonMethodcallWithPorts.class, new NieWorkComparisonMethodcallWithPorts()); - }; - - @AfterClass - public static void compareResults() { - AbstractProfiledPerformanceAssertion pcp = PerformanceCheckProfileRepository.INSTANCE.get(ComparisonMethodcallWithPorts.class); - pcp.check(); - } - -} diff --git a/src/performancetest/java/teetime/examples/HostName.java b/src/performancetest/java/teetime/examples/HostName.java deleted file mode 100644 index 9827dccfc6f9965309a4ffd651375f920d8bee64..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/HostName.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples; - -public enum HostName { - - CHW_HOME("Nogge-PC"), - CHW_WORK("chw-PC"), - NIE_WORK("nie-PC"); - - private final String hostName; - - HostName(final String hostName) { - this.hostName = hostName; - } - - public String getHostName() { - return hostName; - } - - @Override - public String toString() { - return getHostName(); - } -} diff --git a/src/performancetest/java/teetime/examples/NieWorkComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/NieWorkComparisonMethodcallWithPorts.java deleted file mode 100644 index a08282df0f0fb2bf7a0126232329b80d6da0e6b9..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/NieWorkComparisonMethodcallWithPorts.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples; - -import static org.junit.Assert.assertEquals; - -import java.util.Map; -import java.util.Map.Entry; - -import teetime.util.test.eval.PerformanceResult; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceTest; - -public class NieWorkComparisonMethodcallWithPorts extends AbstractProfiledPerformanceAssertion { - - @Override - public String getCorrespondingPerformanceProfile() { - return "NieWork"; - } - - @Override - public void check() { - Map<String, PerformanceResult> performanceResults = PerformanceTest.measurementRepository.performanceResults; - for (Entry<String, PerformanceResult> entry : performanceResults.entrySet()) { - System.out.println("---> " + entry.getKey() + "\n" + entry.getValue()); - } - - PerformanceResult test1 = performanceResults - .get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)"); - PerformanceResult test9 = performanceResults - .get("testWithManyObjects(teetime.examples.experiment09.MethodCallThoughputTimestampAnalysis9Test)"); - PerformanceResult test10 = performanceResults - .get("testWithManyObjects(teetime.examples.experiment10.MethodCallThoughputTimestampAnalysis10Test)"); - PerformanceResult test11 = performanceResults - .get("testWithManyObjects(teetime.examples.experiment11.MethodCallThoughputTimestampAnalysis11Test)"); - PerformanceResult test14 = performanceResults - .get("testWithManyObjects(teetime.examples.experiment14.MethodCallThoughputTimestampAnalysis14Test)"); - PerformanceResult test15 = performanceResults - .get("testWithManyObjects(teetime.examples.experiment15.MethodCallThoughputTimestampAnalysis15Test)"); - PerformanceResult test16a = performanceResults - .get("testWithManyObjectsAnd1Thread(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)"); - PerformanceResult test16b = performanceResults - .get("testWithManyObjectsAnd2Threads(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)"); - PerformanceResult test16c = performanceResults - .get("testWithManyObjectsAnd4Threads(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)"); - PerformanceResult test19a = performanceResults - .get("testWithManyObjectsAnd1Thread(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)"); - PerformanceResult test19b = performanceResults - .get("testWithManyObjectsAnd2Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)"); - PerformanceResult test19c = performanceResults - .get("testWithManyObjectsAnd4Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)"); - - assertEquals(67, (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - assertEquals(14, (double) test10.quantiles.get(0.5) / test1.quantiles.get(0.5), 2.1); - assertEquals(39, (double) test11.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); - assertEquals(35, (double) test9.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - assertEquals(58, (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); - - // below results vary too much, possibly due to the OS' scheduler - // assertEquals(RESULT_TESTS_16, (double) test16a.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // assertEquals(RESULT_TESTS_16, (double) test16b.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // assertEquals(RESULT_TESTS_16, (double) test16c.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // - // assertEquals(RESULT_TESTS_19, (double) test19a.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // assertEquals(RESULT_TESTS_19, (double) test19b.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // assertEquals(RESULT_TESTS_19, (double) test19c.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - - // assertEquals(56, (double) test17.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); - - // check speedup - assertEquals(2, (double) test16a.overallDurationInNs / test16b.overallDurationInNs, 0.2); - assertEquals(3.7, (double) test16a.overallDurationInNs / test16c.overallDurationInNs, 0.2); - - assertEquals(2, (double) test19a.overallDurationInNs / test19b.overallDurationInNs, 0.2); - assertEquals(3.7, (double) test19a.overallDurationInNs / test19c.overallDurationInNs, 0.2); - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment01/ChwHomePerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment01/ChwHomePerformanceCheck.java deleted file mode 100644 index aeb402e44f5e58d69562ab3d33bf776ecff74db5..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment01/ChwHomePerformanceCheck.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment01; - -import static org.junit.Assert.assertEquals; -import teetime.examples.HostName; -import teetime.util.test.eval.PerformanceResult; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceTest; - -class ChwHomePerformanceCheck extends AbstractProfiledPerformanceAssertion { - - @Override - public String getCorrespondingPerformanceProfile() { - return HostName.CHW_HOME.toString(); - } - - @Override - public void check() { - PerformanceResult test01 = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)"); - - assertEquals(292, test01.quantiles.get(0.5), 1); - } -} diff --git a/src/performancetest/java/teetime/examples/experiment01/ChwWorkPerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment01/ChwWorkPerformanceCheck.java deleted file mode 100644 index 946fde600982573cd862f7c4a6f854c440c565d5..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment01/ChwWorkPerformanceCheck.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment01; - -import static org.junit.Assert.assertEquals; -import teetime.examples.HostName; -import teetime.util.test.eval.PerformanceResult; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceTest; - -class ChwWorkPerformanceCheck extends AbstractProfiledPerformanceAssertion { - - @Override - public String getCorrespondingPerformanceProfile() { - return HostName.CHW_WORK.toString(); - } - - @Override - public void check() { - PerformanceResult test01 = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)"); - - assertEquals(410, test01.quantiles.get(0.5), 1); - } -} diff --git a/src/performancetest/java/teetime/examples/experiment01/MethodCallThoughputTimestampAnalysis1Test.java b/src/performancetest/java/teetime/examples/experiment01/MethodCallThoughputTimestampAnalysis1Test.java deleted file mode 100644 index 63be9eae4f2274d0908e3fe3978adceb69cbe67a..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment01/MethodCallThoughputTimestampAnalysis1Test.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment01; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import teetime.util.ConstructorClosure; -import teetime.util.TimestampObject; -import util.test.PerformanceCheckProfileRepository; -import util.test.PerformanceTest; -import util.test.AbstractProfiledPerformanceAssertion; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class MethodCallThoughputTimestampAnalysis1Test extends PerformanceTest { - - @BeforeClass - public static void beforeClass() { - PerformanceCheckProfileRepository.INSTANCE.register(MethodCallThoughputTimestampAnalysis1Test.class, new ChwWorkPerformanceCheck()); - PerformanceCheckProfileRepository.INSTANCE.register(MethodCallThoughputTimestampAnalysis1Test.class, new ChwHomePerformanceCheck()); - }; - - @AfterClass - public static void afterClass() { - AbstractProfiledPerformanceAssertion performanceCheckProfile = PerformanceCheckProfileRepository.INSTANCE.get(MethodCallThoughputTimestampAnalysis1Test.class); - performanceCheckProfile.check(); - }; - - // TODO check why the optimal, but inflexible impl is 500 times faster than our new framework - - @Test - public void testWithManyObjects() { - System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS=" - + NUM_NOOP_FILTERS + "..."); - - final MethodCallThroughputAnalysis1 analysis = new MethodCallThroughputAnalysis1(); - analysis.setNumNoopFilters(NUM_NOOP_FILTERS); - analysis.setTimestampObjects(this.timestampObjects); - analysis.setInput(NUM_OBJECTS_TO_CREATE, new ConstructorClosure<TimestampObject>() { - @Override - public TimestampObject create() { - return new TimestampObject(); - } - }); - analysis.init(); - - this.stopWatch.start(); - try { - analysis.start(); - } finally { - this.stopWatch.end(); - } - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment01/MethodCallThroughputAnalysis1.java b/src/performancetest/java/teetime/examples/experiment01/MethodCallThroughputAnalysis1.java deleted file mode 100644 index 068c4f1872613947c47c315120dfddae5badb8ab..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment01/MethodCallThroughputAnalysis1.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment01; - -import java.util.List; - -import teetime.examples.experiment01.legacystage.LegacyCollectorSink; -import teetime.examples.experiment01.legacystage.LegacyNoopFilter; -import teetime.examples.experiment01.legacystage.LegacyObjectProducer; -import teetime.examples.experiment01.legacystage.LegacyStartTimestampFilter; -import teetime.examples.experiment01.legacystage.LegacyStopTimestampFilter; -import teetime.util.ConstructorClosure; -import teetime.util.TimestampObject; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class MethodCallThroughputAnalysis1 { - - private long numInputObjects; - private ConstructorClosure<TimestampObject> inputObjectCreator; - private int numNoopFilters; - private List<TimestampObject> timestampObjects; - private Runnable runnable; - - public void init() { - this.runnable = this.buildPipeline(); - } - - /** - * @param numNoopFilters - * @since 1.10 - */ - private Runnable buildPipeline() { - @SuppressWarnings("unchecked") - final LegacyNoopFilter<TimestampObject>[] noopFilters = new LegacyNoopFilter[this.numNoopFilters]; - // create stages - final LegacyObjectProducer<TimestampObject> objectProducer = new LegacyObjectProducer<TimestampObject>(this.numInputObjects, this.inputObjectCreator); - final LegacyStartTimestampFilter startTimestampFilter = new LegacyStartTimestampFilter(); - for (int i = 0; i < noopFilters.length; i++) { - noopFilters[i] = new LegacyNoopFilter<TimestampObject>(); - } - final LegacyStopTimestampFilter stopTimestampFilter = new LegacyStopTimestampFilter(); - final LegacyCollectorSink<TimestampObject> collectorSink = new LegacyCollectorSink<TimestampObject>(this.timestampObjects); - - final Runnable runnable = new Runnable() { - @Override - public void run() { - while (true) { - TimestampObject object = objectProducer.execute(); - if (object == null) { - return; - } - - object = startTimestampFilter.execute(object); - for (final LegacyNoopFilter<TimestampObject> noopFilter : noopFilters) { - object = noopFilter.execute(object); - } - object = stopTimestampFilter.execute(object); - collectorSink.execute(object); - } - } - }; - return runnable; - } - - public void start() { - this.runnable.run(); - } - - public void setInput(final int numInputObjects, final ConstructorClosure<TimestampObject> inputObjectCreator) { - this.numInputObjects = numInputObjects; - this.inputObjectCreator = inputObjectCreator; - } - - public int getNumNoopFilters() { - return this.numNoopFilters; - } - - public void setNumNoopFilters(final int numNoopFilters) { - this.numNoopFilters = numNoopFilters; - } - - public List<TimestampObject> getTimestampObjects() { - return this.timestampObjects; - } - - public void setTimestampObjects(final List<TimestampObject> timestampObjects) { - this.timestampObjects = timestampObjects; - } -} diff --git a/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyCollectorSink.java b/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyCollectorSink.java deleted file mode 100644 index dfc933ee8f1957f489ff2d481bd787ca267be045..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyCollectorSink.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment01.legacystage; - -import java.util.List; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class LegacyCollectorSink<T> { - - // private final InputPort<T> inputPort = this.createInputPort(); - // - // public final InputPort<T> getInputPort() { - // return this.inputPort; - // } - - private final List<T> elements; - private final int threshold; - - public LegacyCollectorSink(final List<T> list, final int threshold) { - this.elements = list; - this.threshold = threshold; - } - - public LegacyCollectorSink(final List<T> list) { - this(list, 100000); - } - - public void onIsPipelineHead() { - System.out.println("size: " + this.elements.size()); - } - - public Object execute(final T element) { - this.elements.add(element); - - if ((this.elements.size() % this.threshold) == 0) { - System.out.println("size: " + this.elements.size()); - } - - return new Object(); - // if (this.elements.size() > 90000) { - // // System.out.println("size > 90000: " + this.elements.size()); - // } - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyNoopFilter.java b/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyNoopFilter.java deleted file mode 100644 index 43ffc0e04f9cf8afbdcff8b7e14566bebf26d288..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyNoopFilter.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment01.legacystage; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class LegacyNoopFilter<T> { - - public T execute(final T element) { - return element; - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyObjectProducer.java b/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyObjectProducer.java deleted file mode 100644 index 8612e55d8eb69cfafbeb18be87973a17e295a93c..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyObjectProducer.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment01.legacystage; - -import teetime.util.ConstructorClosure; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class LegacyObjectProducer<T> { - - private long numInputObjects; - private ConstructorClosure<T> inputObjectCreator; - - /** - * @since 1.10 - */ - public LegacyObjectProducer(final long numInputObjects, final ConstructorClosure<T> inputObjectCreator) { - this.numInputObjects = numInputObjects; - this.inputObjectCreator = inputObjectCreator; - } - - public long getNumInputObjects() { - return this.numInputObjects; - } - - public void setNumInputObjects(final long numInputObjects) { - this.numInputObjects = numInputObjects; - } - - public ConstructorClosure<T> getInputObjectCreator() { - return this.inputObjectCreator; - } - - public void setInputObjectCreator(final ConstructorClosure<T> inputObjectCreator) { - this.inputObjectCreator = inputObjectCreator; - } - - public T execute() { - if (this.numInputObjects == 0) { - return null; - } - - T newObject = this.inputObjectCreator.create(); - this.numInputObjects--; - - return newObject; - - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyStartTimestampFilter.java b/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyStartTimestampFilter.java deleted file mode 100644 index f35802459035bb508c1c6b7b3bbe13af07d86918..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyStartTimestampFilter.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment01.legacystage; - -import teetime.util.TimestampObject; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class LegacyStartTimestampFilter { - - public TimestampObject execute(final TimestampObject element) { - element.setStartTimestamp(System.nanoTime()); - return element; - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyStopTimestampFilter.java b/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyStopTimestampFilter.java deleted file mode 100644 index 7bb424090a16a72d1b894757bec5bc4b7c3b905a..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment01/legacystage/LegacyStopTimestampFilter.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment01.legacystage; - -import teetime.util.TimestampObject; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class LegacyStopTimestampFilter { - - public TimestampObject execute(final TimestampObject element) { - element.setStopTimestamp(System.nanoTime()); - return element; - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment09pipeimpls/AbstractPerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment09pipeimpls/AbstractPerformanceCheck.java deleted file mode 100644 index 33a11dbb256ad4a83ee92e0689b582983d5fe7ea..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment09pipeimpls/AbstractPerformanceCheck.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment09pipeimpls; - -import teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test; -import teetime.util.test.eval.PerformanceResult; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.MeasurementRepository; -import util.test.PerformanceTest; - -abstract class AbstractPerformanceCheck extends AbstractProfiledPerformanceAssertion { - - protected PerformanceResult test01; - protected PerformanceResult test09CommittablePipes; - protected PerformanceResult test09SingleElementPipes; - protected PerformanceResult test09OrderedGrowableArrayPipes; - - @Override - public void check() { - String testMethodIdentifier = MeasurementRepository.buildTestMethodIdentifier(MethodCallThoughputTimestampAnalysis1Test.class, "testWithManyObjects"); - test01 = PerformanceTest.measurementRepository.performanceResults.get(testMethodIdentifier); - - testMethodIdentifier = MeasurementRepository.buildTestMethodIdentifier(MethodCallThoughputTimestampAnalysis9Test.class, "testCommittablePipes"); - test09CommittablePipes = PerformanceTest.measurementRepository.performanceResults.get(testMethodIdentifier); - - testMethodIdentifier = MeasurementRepository.buildTestMethodIdentifier(MethodCallThoughputTimestampAnalysis9Test.class, "testSingleElementPipes"); - test09SingleElementPipes = PerformanceTest.measurementRepository.performanceResults.get(testMethodIdentifier); - - testMethodIdentifier = MeasurementRepository.buildTestMethodIdentifier(MethodCallThoughputTimestampAnalysis9Test.class, "testOrderedGrowableArrayPipes"); - test09OrderedGrowableArrayPipes = PerformanceTest.measurementRepository.performanceResults.get(testMethodIdentifier); - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment09pipeimpls/ChwHomePerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment09pipeimpls/ChwHomePerformanceCheck.java deleted file mode 100644 index 672f7bbcb8f1e7166a77934762533360d821346f..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment09pipeimpls/ChwHomePerformanceCheck.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment09pipeimpls; - -import static org.junit.Assert.assertEquals; -import teetime.examples.HostName; - -class ChwHomePerformanceCheck extends AbstractPerformanceCheck { - - @Override - public String getCorrespondingPerformanceProfile() { - return HostName.CHW_HOME.toString(); - } - - @Override - public void check() { - super.check(); - - checkCommittablePipes(); - checkSingleElementPipes(); - checkOrderedGrowableArrayPipes(); - } - - private void checkCommittablePipes() { - double medianSpeedup = (double) test09CommittablePipes.quantiles.get(0.5) / test01.quantiles.get(0.5); - - System.out.println("medianSpeedup (09 committable pipes): " + medianSpeedup); - - // until 25.06.2014 (incl.) - // assertEquals(22, (double) test9.quantiles.get(0.5) / test1.quantiles.get(0.5), 2.1); - // since 26.06.2014 (incl.) - // assertEquals(36, value9, 2.1); // +14 - // since 04.07.2014 (incl.) - // assertEquals(42, value9, 2.1); // +6 - // since 11.08.2014 (incl.) - // assertEquals(42, value9, 2.1); // +6 - // since 31.08.2014 (incl.) - // assertEquals(44, medianSpeedup, 2.1); // +2 - // since 04.11.2014 (incl.) - // assertEquals(71, medianSpeedup, 2.1); // +27 - // since 05.12.2014 (incl.) - assertEquals(43, medianSpeedup, 4.1); // -28 (41-56) - } - - private void checkSingleElementPipes() { - double medianSpeedup = (double) test09SingleElementPipes.quantiles.get(0.5) / test01.quantiles.get(0.5); - - System.out.println("meanSpeedup (09 single element pipes): " + medianSpeedup); - - // since 26.06.2014 (incl.) - // assertEquals(26, value10, 2.1); // +14 - // // since 04.07.2014 (incl.) - // assertEquals(26, value10, 2.1); // +0 - // since 11.08.2014 (incl.) - // assertEquals(47, value10, 2.1); // +21 - // since 31.08.2014 (incl.) - // assertEquals(51, medianSpeedup, 3.2); // +4 - // since 13.12.2014 (incl.) - // assertEquals(40, medianSpeedup, 3.2); // -11 - // since 28.12.2014 (incl.) - assertEquals(26, medianSpeedup, 3.2); // -14 - } - - private void checkOrderedGrowableArrayPipes() { - double medianSpeedup = (double) test09OrderedGrowableArrayPipes.quantiles.get(0.5) / test01.quantiles.get(0.5); - - System.out.println("medianSpeedup (09 ordered growable array pipes): " + medianSpeedup); - - // until 25.06.2014 (incl.) - // assertEquals(60, (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // since 26.06.2014 (incl.) - // assertEquals(76, medianSpeedup, 5.1); // +16 - // since 04.07.2014 (incl.) - // assertEquals(86, medianSpeedup, 5.1); // +16 - // since 11.08.2014 (incl.) - // assertEquals(103, medianSpeedup, 5.1); // +17 - // since 31.08.2014 (incl.) - // assertEquals(62, medianSpeedup, 2.1); // -41 - // since 04.11.2014 (incl.) - // assertEquals(84, medianSpeedup, 2.1); // +22 - // since 05.12.2014 (incl.) - // assertEquals(75, medianSpeedup, 2.1); // -9 - // since 13.12.2014 (incl.) - // assertEquals(44, medianSpeedup, 2.1); // -31 - // since 28.12.2014 (incl.) - assertEquals(46, medianSpeedup, 2.1); // +2 - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment09pipeimpls/ChwWorkPerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment09pipeimpls/ChwWorkPerformanceCheck.java deleted file mode 100644 index 5310463d760c9e0dc0e2f03853fbce5f3caa5190..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment09pipeimpls/ChwWorkPerformanceCheck.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment09pipeimpls; - -import static org.junit.Assert.assertEquals; -import teetime.examples.HostName; - -class ChwWorkPerformanceCheck extends AbstractPerformanceCheck { - - @Override - public String getCorrespondingPerformanceProfile() { - return HostName.CHW_WORK.toString(); - } - - @Override - public void check() { - super.check(); - - checkCommittablePipes(); - checkSingleElementPipes(); - checkOrderedGrowableArrayPipes(); - } - - private void checkCommittablePipes() { - double medianSpeedup = (double) test09CommittablePipes.quantiles.get(0.5) / test01.quantiles.get(0.5); - - System.out.println("medianSpeedup (09): " + medianSpeedup); - - // until 25.06.2014 (incl.) - // assertEquals(22, (double) test9.quantiles.get(0.5) / test1.quantiles.get(0.5), 2.1); - // since 26.06.2014 (incl.) - // assertEquals(36, value9, 2.1); // +14 - // since 04.07.2014 (incl.) - // assertEquals(42, value9, 2.1); // +6 - // since 27.08.2014 (incl.) - // assertEquals(77, value9, 2.1); // +35 - // since 14.10.2014 (incl.) - // assertEquals(67, medianSpeedup, 3.1); // -10 - // since 19.12.2014 (incl.) - assertEquals(53, medianSpeedup, 3.1); // -14 - } - - private void checkSingleElementPipes() { - double medianSpeedup = (double) test09SingleElementPipes.quantiles.get(0.5) / test01.quantiles.get(0.5); - - System.out.println("medianSpeedup (09 single element pipes): " + medianSpeedup); - - // until 25.06.2014 (incl.) - // assertEquals(14, (double) test10.quantiles.get(0.5) / test1.quantiles.get(0.5), 2.1); - // since 26.06.2014 (incl.) - // assertEquals(26, meanSpeedup, 2.1); // +14 - // since 04.07.2014 (incl.) - // assertEquals(26, meanSpeedup, 2.1); // +0 - // since 27.08.2014 (incl.) - // assertEquals(56, meanSpeedup, 2.1); // +30 - // since 14.10.2014 (incl.) - assertEquals(25, medianSpeedup, 3.1); // -31 - } - - private void checkOrderedGrowableArrayPipes() { - double medianSpeedup = (double) test09OrderedGrowableArrayPipes.quantiles.get(0.5) / test01.quantiles.get(0.5); - - System.out.println("medianSpeedup (09 ordered growable array pipes): " + medianSpeedup); - - // until 25.06.2014 (incl.) - // assertEquals(60, (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); - // since 26.06.2014 (incl.) - // assertEquals(76, medianSpeedup, 5.1); // +16 - // since 04.07.2014 (incl.) - // assertEquals(86, medianSpeedup, 5.1); // +16 - // since 27.08.2014 (incl.) - // assertEquals(102, medianSpeedup, 5.1); // +16 - // since 14.10.2014 (incl.) - // assertEquals(81, medianSpeedup, 5.1); // -21 - // since 19.12.2014 (incl.) - assertEquals(56, medianSpeedup, 5.1); // -25 - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThoughputTimestampAnalysis9Test.java b/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThoughputTimestampAnalysis9Test.java deleted file mode 100644 index f26e18fe88ad59f27cdea3e81d6e8d5d5688fd2e..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThoughputTimestampAnalysis9Test.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment09pipeimpls; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -import teetime.framework.pipe.CommittablePipeFactory; -import teetime.framework.pipe.IPipeFactory; -import teetime.framework.pipe.OrderedGrowableArrayPipeFactory; -import teetime.framework.pipe.SingleElementPipeFactory; -import teetime.framework.pipe.UnorderedGrowablePipeFactory; -import teetime.util.ConstructorClosure; -import teetime.util.TimestampObject; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceTest; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class MethodCallThoughputTimestampAnalysis9Test extends PerformanceTest { - - @BeforeClass - public static void beforeClass() { - PERFORMANCE_CHECK_PROFILE_REPOSITORY.register(MethodCallThoughputTimestampAnalysis9Test.class, new ChwWorkPerformanceCheck()); - PERFORMANCE_CHECK_PROFILE_REPOSITORY.register(MethodCallThoughputTimestampAnalysis9Test.class, new ChwHomePerformanceCheck()); - } - - @AfterClass - public static void afterClass() { - AbstractProfiledPerformanceAssertion performanceCheckProfile = PERFORMANCE_CHECK_PROFILE_REPOSITORY.get(MethodCallThoughputTimestampAnalysis9Test.class); - performanceCheckProfile.check(); - } - - @Test - public void testCommittablePipes() throws Exception { - IPipeFactory pipeFactory = new CommittablePipeFactory(); - testWithManyObjects(pipeFactory); - } - - @Test - public void testSingleElementPipes() throws Exception { - IPipeFactory pipeFactory = new SingleElementPipeFactory(); - testWithManyObjects(pipeFactory); - } - - @Test - public void testOrderedGrowableArrayPipes() throws Exception { - IPipeFactory pipeFactory = new OrderedGrowableArrayPipeFactory(); - testWithManyObjects(pipeFactory); - } - - @Ignore - @Test - public void testUnorderedGrowablePipes() throws Exception { // TODO remove test 11 - IPipeFactory pipeFactory = new UnorderedGrowablePipeFactory(); - testWithManyObjects(pipeFactory); - } - - private void testWithManyObjects(final IPipeFactory pipeFactory) { - System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS=" - + NUM_NOOP_FILTERS + "..."); - - final MethodCallThroughputAnalysis9 analysis = new MethodCallThroughputAnalysis9(); - analysis.setNumNoopFilters(NUM_NOOP_FILTERS); - analysis.setTimestampObjects(this.timestampObjects); - analysis.setInput(NUM_OBJECTS_TO_CREATE, new ConstructorClosure<TimestampObject>() { - @Override - public TimestampObject create() { - return new TimestampObject(); - } - }); - analysis.init(pipeFactory); - - this.stopWatch.start(); - try { - analysis.start(); - } finally { - this.stopWatch.end(); - } - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThroughputAnalysis9.java b/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThroughputAnalysis9.java deleted file mode 100644 index ef831990a9bb8a693a3ebed0241b9f2210513744..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment09pipeimpls/MethodCallThroughputAnalysis9.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment09pipeimpls; - -import java.util.List; - -import teetime.framework.OldHeadPipeline; -import teetime.framework.RunnableProducerStage; -import teetime.framework.Stage; -import teetime.framework.pipe.IPipeFactory; -import teetime.stage.CollectorSink; -import teetime.stage.NoopFilter; -import teetime.stage.ObjectProducer; -import teetime.stage.StartTimestampFilter; -import teetime.stage.StopTimestampFilter; -import teetime.util.ConstructorClosure; -import teetime.util.TimestampObject; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class MethodCallThroughputAnalysis9 { - - private int numInputObjects; - private ConstructorClosure<TimestampObject> inputObjectCreator; - private int numNoopFilters; - private List<TimestampObject> timestampObjects; - private Runnable runnable; - - public void init(final IPipeFactory pipeFactory) { - Stage pipeline = this.buildPipeline(pipeFactory); - this.runnable = new RunnableProducerStage(pipeline); - } - - /** - * @param pipeFactory - * @param numNoopFilters - * @return - * @since 1.10 - */ - private OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>> buildPipeline(final IPipeFactory pipeFactory) { - @SuppressWarnings("unchecked") - final NoopFilter<TimestampObject>[] noopFilters = new NoopFilter[this.numNoopFilters]; - // create stages - final ObjectProducer<TimestampObject> objectProducer = new ObjectProducer<TimestampObject>(this.numInputObjects, this.inputObjectCreator); - final StartTimestampFilter startTimestampFilter = new StartTimestampFilter(); - for (int i = 0; i < noopFilters.length; i++) { - noopFilters[i] = new NoopFilter<TimestampObject>(); - } - final StopTimestampFilter stopTimestampFilter = new StopTimestampFilter(); - final CollectorSink<TimestampObject> collectorSink = new CollectorSink<TimestampObject>(this.timestampObjects); - - final OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>> pipeline = new OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>>(); - pipeline.setFirstStage(objectProducer); - pipeline.setLastStage(collectorSink); - - pipeFactory.create(objectProducer.getOutputPort(), startTimestampFilter.getInputPort()); - pipeFactory.create(startTimestampFilter.getOutputPort(), noopFilters[0].getInputPort()); - for (int i = 0; i < noopFilters.length - 1; i++) { - pipeFactory.create(noopFilters[i].getOutputPort(), noopFilters[i + 1].getInputPort()); - } - pipeFactory.create(noopFilters[noopFilters.length - 1].getOutputPort(), stopTimestampFilter.getInputPort()); - pipeFactory.create(stopTimestampFilter.getOutputPort(), collectorSink.getInputPort()); - - return pipeline; - } - - public void start() { - this.runnable.run(); - } - - public void setInput(final int numInputObjects, final ConstructorClosure<TimestampObject> inputObjectCreator) { - this.numInputObjects = numInputObjects; - this.inputObjectCreator = inputObjectCreator; - } - - public int getNumNoopFilters() { - return this.numNoopFilters; - } - - public void setNumNoopFilters(final int numNoopFilters) { - this.numNoopFilters = numNoopFilters; - } - - public List<TimestampObject> getTimestampObjects() { - return this.timestampObjects; - } - - public void setTimestampObjects(final List<TimestampObject> timestampObjects) { - this.timestampObjects = timestampObjects; - } -} diff --git a/src/performancetest/java/teetime/examples/experiment11/ChwHomePerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment11/ChwHomePerformanceCheck.java deleted file mode 100644 index 1242345f2499aa3af3718e83774fc6a8df4c1190..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment11/ChwHomePerformanceCheck.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment11; - -import static org.junit.Assert.assertEquals; -import teetime.examples.HostName; -import teetime.util.test.eval.PerformanceResult; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceTest; - -class ChwHomePerformanceCheck extends AbstractProfiledPerformanceAssertion { - - @Override - public String getCorrespondingPerformanceProfile() { - return HostName.CHW_HOME.toString(); - } - - @Override - public void check() { - PerformanceResult test01 = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)"); - PerformanceResult test11 = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjects(teetime.examples.experiment11.MethodCallThoughputTimestampAnalysis11Test)"); - - double medianSpeedup = (double) test11.quantiles.get(0.5) / test01.quantiles.get(0.5); - - System.out.println("medianSpeedup (11): " + medianSpeedup); - - // until 25.06.2014 (incl.) - // assertEquals(32, (double) test11.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); - // since 26.06.2014 (incl.) - // assertEquals(44, medianSpeedup, 4.1); // +12 - // since 04.07.2014 (incl.) - // assertEquals(41, medianSpeedup, 4.1); // -3 - // since 11.08.2014 (incl.) - // assertEquals(41, medianSpeedup, 4.1); // -3 - // since 31.08.2014 (incl.) - assertEquals(43, medianSpeedup, 4.1); // ?? - } -} diff --git a/src/performancetest/java/teetime/examples/experiment11/ChwWorkPerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment11/ChwWorkPerformanceCheck.java deleted file mode 100644 index 14ce2648aa503b81826bf92d86eb39c9807fbf0b..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment11/ChwWorkPerformanceCheck.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment11; - -import static org.junit.Assert.assertEquals; -import teetime.examples.HostName; -import teetime.util.test.eval.PerformanceResult; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceTest; - -class ChwWorkPerformanceCheck extends AbstractProfiledPerformanceAssertion { - - @Override - public String getCorrespondingPerformanceProfile() { - return HostName.CHW_WORK.toString(); - } - - @Override - public void check() { - PerformanceResult test01 = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)"); - PerformanceResult test11 = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjects(teetime.examples.experiment11.MethodCallThoughputTimestampAnalysis11Test)"); - - double medianSpeedup = (double) test11.quantiles.get(0.5) / test01.quantiles.get(0.5); - - System.out.println("medianSpeedup (11): " + medianSpeedup); - - // until 25.06.2014 (incl.) - // assertEquals(32, (double) test11.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); - // since 26.06.2014 (incl.) - // assertEquals(44, medianSpeedup, 4.1); // +12 - // since 04.07.2014 (incl.) - // assertEquals(41, medianSpeedup, 4.1); // -3 - // since 27.08.2014 (incl.) - // assertEquals(64, medianSpeedup, 4.1); // +15 - // since 14.10.2014 (incl.) - assertEquals(44, medianSpeedup, 4.1); // -20 - } -} diff --git a/src/performancetest/java/teetime/examples/experiment11/MethodCallThoughputTimestampAnalysis11Test.java b/src/performancetest/java/teetime/examples/experiment11/MethodCallThoughputTimestampAnalysis11Test.java deleted file mode 100644 index 71a8322fb0ab1762ebb10c520e1414a8f9e25b1f..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment11/MethodCallThoughputTimestampAnalysis11Test.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment11; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import teetime.util.ConstructorClosure; -import teetime.util.TimestampObject; -import util.test.PerformanceTest; -import util.test.AbstractProfiledPerformanceAssertion; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class MethodCallThoughputTimestampAnalysis11Test extends PerformanceTest { - - @BeforeClass - public static void beforeClass() { - PERFORMANCE_CHECK_PROFILE_REPOSITORY.register(MethodCallThoughputTimestampAnalysis11Test.class, new ChwWorkPerformanceCheck()); - PERFORMANCE_CHECK_PROFILE_REPOSITORY.register(MethodCallThoughputTimestampAnalysis11Test.class, new ChwHomePerformanceCheck()); - }; - - @AfterClass - public static void afterClass() { - AbstractProfiledPerformanceAssertion performanceCheckProfile = PERFORMANCE_CHECK_PROFILE_REPOSITORY.get(MethodCallThoughputTimestampAnalysis11Test.class); - performanceCheckProfile.check(); - }; - - @Test - public void testWithManyObjects() { - System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS=" - + NUM_NOOP_FILTERS + "..."); - - final MethodCallThroughputAnalysis11 analysis = new MethodCallThroughputAnalysis11(); - analysis.setNumNoopFilters(NUM_NOOP_FILTERS); - analysis.setTimestampObjects(this.timestampObjects); - analysis.setInput(NUM_OBJECTS_TO_CREATE, new ConstructorClosure<TimestampObject>() { - @Override - public TimestampObject create() { - return new TimestampObject(); - } - }); - analysis.init(); - - this.stopWatch.start(); - try { - analysis.start(); - } finally { - this.stopWatch.end(); - } - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment11/MethodCallThroughputAnalysis11.java b/src/performancetest/java/teetime/examples/experiment11/MethodCallThroughputAnalysis11.java deleted file mode 100644 index 0866ada04cc23a0d16769b22e7044e2cf22765b2..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment11/MethodCallThroughputAnalysis11.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment11; - -import java.util.List; - -import teetime.framework.OldHeadPipeline; -import teetime.framework.RunnableProducerStage; -import teetime.framework.Stage; -import teetime.framework.pipe.UnorderedGrowablePipe; -import teetime.stage.CollectorSink; -import teetime.stage.NoopFilter; -import teetime.stage.ObjectProducer; -import teetime.stage.StartTimestampFilter; -import teetime.stage.StopTimestampFilter; -import teetime.util.ConstructorClosure; -import teetime.util.TimestampObject; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class MethodCallThroughputAnalysis11 { - - private long numInputObjects; - private ConstructorClosure<TimestampObject> inputObjectCreator; - private int numNoopFilters; - private List<TimestampObject> timestampObjects; - private Runnable runnable; - - public void init() { - Stage pipeline = this.buildPipeline(this.numInputObjects, this.inputObjectCreator); - this.runnable = new RunnableProducerStage(pipeline); - } - - private OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>> buildPipeline(final long numInputObjects, - final ConstructorClosure<TimestampObject> inputObjectCreator) { - @SuppressWarnings("unchecked") - final NoopFilter<TimestampObject>[] noopFilters = new NoopFilter[this.numNoopFilters]; - // create stages - final ObjectProducer<TimestampObject> objectProducer = new ObjectProducer<TimestampObject>(numInputObjects, inputObjectCreator); - // Relay<TimestampObject> relay = new Relay<TimestampObject>(); - // NoopFilter<TimestampObject> relayFake = new NoopFilter<TimestampObject>(); - final StartTimestampFilter startTimestampFilter = new StartTimestampFilter(); - for (int i = 0; i < noopFilters.length; i++) { - noopFilters[i] = new NoopFilter<TimestampObject>(); - } - final StopTimestampFilter stopTimestampFilter = new StopTimestampFilter(); - final CollectorSink<TimestampObject> collectorSink = new CollectorSink<TimestampObject>(this.timestampObjects); - - final OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>> pipeline = new OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>>(); - pipeline.setFirstStage(objectProducer); - pipeline.setLastStage(collectorSink); - - UnorderedGrowablePipe.connect(objectProducer.getOutputPort(), startTimestampFilter.getInputPort()); - // UnorderedGrowablePipe.connect(objectProducer.getOutputPort(), relayFake.getInputPort()); - // UnorderedGrowablePipe.connect(relayFake.getOutputPort(), startTimestampFilter.getInputPort()); - - UnorderedGrowablePipe.connect(startTimestampFilter.getOutputPort(), noopFilters[0].getInputPort()); - for (int i = 0; i < noopFilters.length - 1; i++) { - UnorderedGrowablePipe.connect(noopFilters[i].getOutputPort(), noopFilters[i + 1].getInputPort()); - } - UnorderedGrowablePipe.connect(noopFilters[noopFilters.length - 1].getOutputPort(), stopTimestampFilter.getInputPort()); - UnorderedGrowablePipe.connect(stopTimestampFilter.getOutputPort(), collectorSink.getInputPort()); - - return pipeline; - } - - public void start() { - this.runnable.run(); - } - - public void setInput(final int numInputObjects, final ConstructorClosure<TimestampObject> inputObjectCreator) { - this.numInputObjects = numInputObjects; - this.inputObjectCreator = inputObjectCreator; - } - - public int getNumNoopFilters() { - return this.numNoopFilters; - } - - public void setNumNoopFilters(final int numNoopFilters) { - this.numNoopFilters = numNoopFilters; - } - - public List<TimestampObject> getTimestampObjects() { - return this.timestampObjects; - } - - public void setTimestampObjects(final List<TimestampObject> timestampObjects) { - this.timestampObjects = timestampObjects; - } -} diff --git a/src/performancetest/java/teetime/examples/experiment15/MethodCallThoughputTimestampAnalysis15Test.java b/src/performancetest/java/teetime/examples/experiment15/MethodCallThoughputTimestampAnalysis15Test.java deleted file mode 100644 index ec11de6338d8e3019b1206f36e9e7f5ebb2a6b0c..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment15/MethodCallThoughputTimestampAnalysis15Test.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment15; - -import org.junit.Test; - -import teetime.util.ConstructorClosure; -import teetime.util.TimestampObject; -import util.test.PerformanceTest; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class MethodCallThoughputTimestampAnalysis15Test extends PerformanceTest { - - @Test - public void testWithManyObjects() { - System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS=" - + NUM_NOOP_FILTERS + "..."); - - final MethodCallThroughputAnalysis15 analysis = new MethodCallThroughputAnalysis15(); - analysis.setNumNoopFilters(NUM_NOOP_FILTERS); - analysis.setTimestampObjects(this.timestampObjects); - analysis.setInput(NUM_OBJECTS_TO_CREATE, new ConstructorClosure<TimestampObject>() { - @Override - public TimestampObject create() { - return new TimestampObject(); - } - }); - analysis.init(); - - this.stopWatch.start(); - try { - analysis.start(); - } finally { - this.stopWatch.end(); - } - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment15/MethodCallThroughputAnalysis15.java b/src/performancetest/java/teetime/examples/experiment15/MethodCallThroughputAnalysis15.java deleted file mode 100644 index 51586ffbc451af8bdd86cf291df374c99bd360a2..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment15/MethodCallThroughputAnalysis15.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment15; - -import java.util.List; - -import teetime.framework.AnalysisConfiguration; -import teetime.framework.OldHeadPipeline; -import teetime.framework.RunnableProducerStage; -import teetime.framework.Stage; -import teetime.framework.pipe.OrderedGrowableArrayPipe; -import teetime.framework.pipe.SpScPipe; -import teetime.stage.Clock; -import teetime.stage.CollectorSink; -import teetime.stage.NoopFilter; -import teetime.stage.ObjectProducer; -import teetime.stage.StartTimestampFilter; -import teetime.stage.StopTimestampFilter; -import teetime.stage.basic.Delay; -import teetime.stage.basic.Sink; -import teetime.util.ConstructorClosure; -import teetime.util.TimestampObject; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class MethodCallThroughputAnalysis15 extends AnalysisConfiguration { - // FIXME this analysis sometimes runs infinitely - - private static final int SPSC_INITIAL_CAPACITY = 4; - - private int numInputObjects; - private ConstructorClosure<TimestampObject> inputObjectCreator; - private int numNoopFilters; - private List<TimestampObject> timestampObjects; - - private Runnable clockRunnable; - private Runnable runnable; - private Clock clock; - - public void init() { - OldHeadPipeline<Clock, Sink<Long>> clockPipeline = this.buildClockPipeline(); - this.clockRunnable = new RunnableProducerStage(clockPipeline); - - Stage pipeline = this.buildPipeline(this.clock); - this.runnable = new RunnableProducerStage(pipeline); - } - - private OldHeadPipeline<Clock, Sink<Long>> buildClockPipeline() { - this.clock = new Clock(); - - this.clock.setInitialDelayInMs(100); - this.clock.setIntervalDelayInMs(100); - - final OldHeadPipeline<Clock, Sink<Long>> pipeline = new OldHeadPipeline<Clock, Sink<Long>>(); - pipeline.setFirstStage(this.clock); - pipeline.setLastStage(new Sink<Long>()); - - return pipeline; - } - - /** - * @param numNoopFilters - * @return - * @since 1.10 - */ - private OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>> buildPipeline(final Clock clock) { - @SuppressWarnings("unchecked") - final NoopFilter<TimestampObject>[] noopFilters = new NoopFilter[this.numNoopFilters]; - // create stages - final ObjectProducer<TimestampObject> objectProducer = new ObjectProducer<TimestampObject>(this.numInputObjects, this.inputObjectCreator); - Delay<TimestampObject> delay = new Delay<TimestampObject>(); - final StartTimestampFilter startTimestampFilter = new StartTimestampFilter(); - for (int i = 0; i < noopFilters.length; i++) { - noopFilters[i] = new NoopFilter<TimestampObject>(); - } - final StopTimestampFilter stopTimestampFilter = new StopTimestampFilter(); - final CollectorSink<TimestampObject> collectorSink = new CollectorSink<TimestampObject>(this.timestampObjects); - - final OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>> pipeline = new OldHeadPipeline<ObjectProducer<TimestampObject>, CollectorSink<TimestampObject>>(); - pipeline.setFirstStage(objectProducer); - pipeline.setLastStage(collectorSink); - - SpScPipe.connect(clock.getOutputPort(), delay.getTimestampTriggerInputPort(), SPSC_INITIAL_CAPACITY); - - connectIntraThreads(objectProducer.getOutputPort(), startTimestampFilter.getInputPort()); - connectIntraThreads(startTimestampFilter.getOutputPort(), noopFilters[0].getInputPort()); - for (int i = 0; i < noopFilters.length - 1; i++) { - connectIntraThreads(noopFilters[i].getOutputPort(), noopFilters[i + 1].getInputPort()); - } - connectIntraThreads(noopFilters[noopFilters.length - 1].getOutputPort(), stopTimestampFilter.getInputPort()); - OrderedGrowableArrayPipe.connect(stopTimestampFilter.getOutputPort(), delay.getInputPort()); - - connectIntraThreads(delay.getOutputPort(), collectorSink.getInputPort()); - - return pipeline; - } - - public void start() { - Thread clockThread = new Thread(this.clockRunnable); - clockThread.start(); - this.runnable.run(); - clockThread.interrupt(); - } - - public void setInput(final int numInputObjects, final ConstructorClosure<TimestampObject> inputObjectCreator) { - this.numInputObjects = numInputObjects; - this.inputObjectCreator = inputObjectCreator; - } - - public int getNumNoopFilters() { - return this.numNoopFilters; - } - - public void setNumNoopFilters(final int numNoopFilters) { - this.numNoopFilters = numNoopFilters; - } - - public List<TimestampObject> getTimestampObjects() { - return this.timestampObjects; - } - - public void setTimestampObjects(final List<TimestampObject> timestampObjects) { - this.timestampObjects = timestampObjects; - } -} diff --git a/src/performancetest/java/teetime/examples/experiment16/AnalysisConfiguration16.java b/src/performancetest/java/teetime/examples/experiment16/AnalysisConfiguration16.java deleted file mode 100644 index 396cce7abdc3cecea77113e780c43787710a3422..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment16/AnalysisConfiguration16.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment16; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import teetime.framework.AnalysisConfiguration; -import teetime.framework.OldHeadPipeline; -import teetime.framework.pipe.SpScPipe; -import teetime.stage.CollectorSink; -import teetime.stage.NoopFilter; -import teetime.stage.ObjectProducer; -import teetime.stage.Relay; -import teetime.stage.StartTimestampFilter; -import teetime.stage.StopTimestampFilter; -import teetime.stage.basic.distributor.Distributor; -import teetime.stage.io.EveryXthPrinter; -import teetime.util.ConstructorClosure; -import teetime.util.TimestampObject; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -class AnalysisConfiguration16 extends AnalysisConfiguration { - - private static final int SPSC_INITIAL_CAPACITY = 100100; - private static final int NUM_WORKER_THREADS = Runtime.getRuntime().availableProcessors(); - - private int numInputObjects; - private ConstructorClosure<TimestampObject> inputObjectCreator; - private final int numNoopFilters; - - private final List<List<TimestampObject>> timestampObjectsList = new LinkedList<List<TimestampObject>>(); - - private int numWorkerThreads; - - public AnalysisConfiguration16(final int numWorkerThreads, final int numNoopFilters) { - this.numWorkerThreads = numWorkerThreads; - this.numNoopFilters = numNoopFilters; - } - - public void build() { - OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>> producerPipeline = this.buildProducerPipeline(this.numInputObjects, - this.inputObjectCreator); - addThreadableStage(producerPipeline); - - this.numWorkerThreads = Math.min(NUM_WORKER_THREADS, this.numWorkerThreads); - - for (int i = 0; i < numWorkerThreads; i++) { - List<TimestampObject> resultList = new ArrayList<TimestampObject>(this.numInputObjects); - this.timestampObjectsList.add(resultList); - - OldHeadPipeline<Relay<TimestampObject>, CollectorSink<TimestampObject>> workerPipeline = this.buildPipeline(producerPipeline, resultList); - addThreadableStage(workerPipeline); - } - } - - private OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>> buildProducerPipeline(final int numInputObjects, - final ConstructorClosure<TimestampObject> inputObjectCreator) { - final ObjectProducer<TimestampObject> objectProducer = new ObjectProducer<TimestampObject>(numInputObjects, inputObjectCreator); - Distributor<TimestampObject> distributor = new Distributor<TimestampObject>(); - - final OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>> pipeline = new OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>>(); - pipeline.setFirstStage(objectProducer); - pipeline.setLastStage(distributor); - - connectIntraThreads(objectProducer.getOutputPort(), distributor.getInputPort()); - - return pipeline; - } - - /** - * @param numNoopFilters - * @since 1.10 - */ - private OldHeadPipeline<Relay<TimestampObject>, CollectorSink<TimestampObject>> buildPipeline( - final OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>> previousStage, - final List<TimestampObject> timestampObjects) { - Relay<TimestampObject> relay = new Relay<TimestampObject>(); - @SuppressWarnings("unchecked") - final NoopFilter<TimestampObject>[] noopFilters = new NoopFilter[this.numNoopFilters]; - // create stages - final StartTimestampFilter startTimestampFilter = new StartTimestampFilter(); - for (int i = 0; i < noopFilters.length; i++) { - noopFilters[i] = new NoopFilter<TimestampObject>(); - } - final StopTimestampFilter stopTimestampFilter = new StopTimestampFilter(); - EveryXthPrinter<TimestampObject> everyXthPrinter = new EveryXthPrinter<TimestampObject>(100000); - final CollectorSink<TimestampObject> collectorSink = new CollectorSink<TimestampObject>(timestampObjects); - - final OldHeadPipeline<Relay<TimestampObject>, CollectorSink<TimestampObject>> pipeline = new OldHeadPipeline<Relay<TimestampObject>, CollectorSink<TimestampObject>>(); - pipeline.setFirstStage(relay); - pipeline.setLastStage(collectorSink); - - SpScPipe.connect(previousStage.getLastStage().getNewOutputPort(), relay.getInputPort(), SPSC_INITIAL_CAPACITY); - - connectIntraThreads(relay.getOutputPort(), startTimestampFilter.getInputPort()); - - connectIntraThreads(startTimestampFilter.getOutputPort(), noopFilters[0].getInputPort()); - for (int i = 0; i < noopFilters.length - 1; i++) { - connectIntraThreads(noopFilters[i].getOutputPort(), noopFilters[i + 1].getInputPort()); - } - connectIntraThreads(noopFilters[noopFilters.length - 1].getOutputPort(), stopTimestampFilter.getInputPort()); - connectIntraThreads(stopTimestampFilter.getOutputPort(), everyXthPrinter.getInputPort()); - connectIntraThreads(everyXthPrinter.getNewOutputPort(), collectorSink.getInputPort()); - - return pipeline; - } - - public void setInput(final int numInputObjects, final ConstructorClosure<TimestampObject> inputObjectCreator) { - this.numInputObjects = numInputObjects; - this.inputObjectCreator = inputObjectCreator; - } - - public int getNumNoopFilters() { - return this.numNoopFilters; - } - - public List<List<TimestampObject>> getTimestampObjectsList() { - return this.timestampObjectsList; - } - - public int getNumWorkerThreads() { - return this.numWorkerThreads; - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment16/ChwHomePerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment16/ChwHomePerformanceCheck.java deleted file mode 100644 index 8c3945d8c0445bcd88fc5c7aaee4fd385a66e1a1..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment16/ChwHomePerformanceCheck.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment16; - -import static org.junit.Assert.assertEquals; -import teetime.examples.HostName; -import teetime.util.test.eval.PerformanceResult; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceTest; - -class ChwHomePerformanceCheck extends AbstractProfiledPerformanceAssertion { - - @Override - public String getCorrespondingPerformanceProfile() { - return HostName.CHW_HOME.toString(); - } - - @Override - public void check() { - PerformanceResult test16a = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjectsAnd1Thread(" + MethodCallThoughputTimestampAnalysis16Test.class.getName() + ")"); - PerformanceResult test16b = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjectsAnd2Threads(" + MethodCallThoughputTimestampAnalysis16Test.class.getName() + ")"); - PerformanceResult test16c = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjectsAnd4Threads(" + MethodCallThoughputTimestampAnalysis16Test.class.getName() + ")"); - // check speedup - double speedupA2B = (double) test16a.overallDurationInNs / test16b.overallDurationInNs; - double speedupB2C = (double) test16b.overallDurationInNs / test16c.overallDurationInNs; - - System.out.println(ChwHomePerformanceCheck.class.getName() + ", speedupB: " + speedupA2B); - System.out.println(ChwHomePerformanceCheck.class.getName() + ", speedupC: " + speedupB2C); - - // assertEquals(2, speedupB, 0.3); - // since 31.08.2014 (incl.) - // assertEquals(3.6, speedupC, 0.3); - // since 04.11.2014 (incl.) - // assertEquals(5, speedupC, 0.4); - // since 07.12.2014 (incl.) - // assertEquals(2, speedupA2B, 0.4); - // assertEquals(5, speedupB2C, 0.4); - // since 28.12.2014 (incl.) - assertEquals(2, speedupA2B, 0.4); - assertEquals(2, speedupB2C, 0.4); - } -} diff --git a/src/performancetest/java/teetime/examples/experiment16/ChwWorkPerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment16/ChwWorkPerformanceCheck.java deleted file mode 100644 index 00ce7dde854ade9c6bc3db27f5197ae339cb7ee1..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment16/ChwWorkPerformanceCheck.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment16; - -import static org.junit.Assert.assertEquals; -import teetime.examples.HostName; -import teetime.util.test.eval.PerformanceResult; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceTest; - -class ChwWorkPerformanceCheck extends AbstractProfiledPerformanceAssertion { - - @Override - public String getCorrespondingPerformanceProfile() { - return HostName.CHW_WORK.toString(); - } - - @Override - public void check() { - PerformanceResult test16a = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjectsAnd1Thread(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)"); - PerformanceResult test16b = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjectsAnd2Threads(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)"); - PerformanceResult test16c = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjectsAnd4Threads(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)"); - // check speedup - double speedupB = (double) test16a.overallDurationInNs / test16b.overallDurationInNs; - double speedupC = (double) test16a.overallDurationInNs / test16c.overallDurationInNs; - - System.out.println("speedupB: " + speedupB); - System.out.println("speedupC: " + speedupC); - - assertEquals(2, speedupB, 0.3); - // assertEquals(2.5, speedupC, 0.3); - // since 19.12.2014 - assertEquals(2.0, speedupC, 0.3); - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment16/MethodCallThoughputTimestampAnalysis16Test.java b/src/performancetest/java/teetime/examples/experiment16/MethodCallThoughputTimestampAnalysis16Test.java deleted file mode 100644 index 15ba3ff9f5bdba9e9df721057bca364d3b564875..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment16/MethodCallThoughputTimestampAnalysis16Test.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment16; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.FixMethodOrder; -import org.junit.Test; -import org.junit.runners.MethodSorters; - -import teetime.framework.Analysis; -import teetime.util.ConstructorClosure; -import teetime.util.ListUtil; -import teetime.util.TimestampObject; -import util.test.AbstractProfiledPerformanceAssertion; -import util.test.PerformanceCheckProfileRepository; -import util.test.PerformanceTest; - -/** - * @author Christian Wulf - * - * @since 1.0 - */ -@FixMethodOrder(MethodSorters.NAME_ASCENDING) -// @RunWith(Parameterized.class) -public class MethodCallThoughputTimestampAnalysis16Test extends PerformanceTest { - - // private final int numThreads; - // - // @Parameters - // public static Iterable<Object[]> data() { - // return Arrays.asList(new Object[][] { - // { 1 }, { 2 }, { 4 } - // }); - // } - // - // public MethodCallThoughputTimestampAnalysis16Test(final int numThreads) { - // this.numThreads = numThreads; - // } - - @BeforeClass - public static void beforeClass() { - PerformanceCheckProfileRepository.INSTANCE.register(MethodCallThoughputTimestampAnalysis16Test.class, new ChwWorkPerformanceCheck()); - PerformanceCheckProfileRepository.INSTANCE.register(MethodCallThoughputTimestampAnalysis16Test.class, new ChwHomePerformanceCheck()); - } - - @AfterClass - public static void afterClass() { - AbstractProfiledPerformanceAssertion pcp = PerformanceCheckProfileRepository.INSTANCE.get(MethodCallThoughputTimestampAnalysis16Test.class); - pcp.check(); - } - - @Test - public void testWithManyObjectsAnd1Thread() { - performAnalysis(1); - } - - @Test - public void testWithManyObjectsAnd2Threads() { - performAnalysis(2); - } - - @Test - public void testWithManyObjectsAnd4Threads() { - performAnalysis(4); - } - - private void performAnalysis(final int numThreads) { - System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS=" - + NUM_NOOP_FILTERS + "..."); - - final AnalysisConfiguration16 configuration = new AnalysisConfiguration16(numThreads, NUM_NOOP_FILTERS); - configuration.setInput(NUM_OBJECTS_TO_CREATE, new ConstructorClosure<TimestampObject>() { - @Override - public TimestampObject create() { - return new TimestampObject(); - } - }); - configuration.build(); - - final Analysis analysis = new Analysis(configuration); - - this.stopWatch.start(); - try { - analysis.executeBlocking(); - } finally { - this.stopWatch.end(); - } - - this.timestampObjects = ListUtil.merge(configuration.getTimestampObjectsList()); - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment19/MethodCallThoughputTimestampAnalysis19Test.java b/src/performancetest/java/teetime/examples/experiment19/MethodCallThoughputTimestampAnalysis19Test.java deleted file mode 100644 index d100c6b62752cc82b8ceb0b2e31343f92d07ef8b..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment19/MethodCallThoughputTimestampAnalysis19Test.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment19; - -import org.junit.FixMethodOrder; -import org.junit.Test; -import org.junit.runners.MethodSorters; - -import teetime.framework.Analysis; -import teetime.util.ConstructorClosure; -import teetime.util.ListUtil; -import teetime.util.TimestampObject; -import util.test.PerformanceTest; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -@FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class MethodCallThoughputTimestampAnalysis19Test extends PerformanceTest { - - // TODO use @Parameter for the number of threads - - @Test - public void testWithManyObjectsAnd1Thread() { - this.performAnalysis(1); - } - - @Test - public void testWithManyObjectsAnd2Threads() { - this.performAnalysis(2); - } - - @Test - public void testWithManyObjectsAnd4Threads() { - this.performAnalysis(4); - } - - // @AfterClass - // public static void afterClass() { - // PerformanceResult test16a = PerformanceTest.measurementRepository.performanceResults - // .get("testWithManyObjectsAnd1Thread(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)"); - // PerformanceResult test16b = PerformanceTest.measurementRepository.performanceResults - // .get("testWithManyObjectsAnd2Threads(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)"); - // PerformanceResult test16c = PerformanceTest.measurementRepository.performanceResults - // .get("testWithManyObjectsAnd4Threads(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)"); - // // check speedup - // assertEquals(2, (double) test16a.overallDurationInNs / test16b.overallDurationInNs, 0.2); - // assertEquals(2.5, (double) test16a.overallDurationInNs / test16c.overallDurationInNs, 0.2); - // } - - private void performAnalysis(final int numThreads) { - System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS=" - + NUM_NOOP_FILTERS + "..."); - - final MethodCallThroughputAnalysis19 configuration = new MethodCallThroughputAnalysis19(numThreads, NUM_NOOP_FILTERS); - configuration.setInput(NUM_OBJECTS_TO_CREATE, new ConstructorClosure<TimestampObject>() { - @Override - public TimestampObject create() { - return new TimestampObject(); - } - }); - configuration.build(); - - final Analysis analysis = new Analysis(configuration); - - this.stopWatch.start(); - try { - analysis.executeBlocking(); - } finally { - this.stopWatch.end(); - } - - this.timestampObjects = ListUtil.merge(configuration.getTimestampObjectsList()); - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment19/MethodCallThroughputAnalysis19.java b/src/performancetest/java/teetime/examples/experiment19/MethodCallThroughputAnalysis19.java deleted file mode 100644 index af36e37f1aa371510d51a3dfc4163622885a5bb7..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/experiment19/MethodCallThroughputAnalysis19.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.experiment19; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -import teetime.framework.AnalysisConfiguration; -import teetime.framework.OldHeadPipeline; -import teetime.framework.pipe.OrderedGrowableArrayPipe; -import teetime.framework.pipe.SpScPipe; -import teetime.stage.CollectorSink; -import teetime.stage.NoopFilter; -import teetime.stage.ObjectProducer; -import teetime.stage.Relay; -import teetime.stage.StartTimestampFilter; -import teetime.stage.StopTimestampFilter; -import teetime.stage.basic.distributor.Distributor; -import teetime.stage.io.EveryXthPrinter; -import teetime.util.ConstructorClosure; -import teetime.util.TimestampObject; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class MethodCallThroughputAnalysis19 extends AnalysisConfiguration { - - private static final int SPSC_INITIAL_CAPACITY = 100100; - private static final int NUM_WORKER_THREADS = Runtime.getRuntime().availableProcessors(); - - private final List<List<TimestampObject>> timestampObjectsList = new LinkedList<List<TimestampObject>>(); - - private int numInputObjects; - private ConstructorClosure<TimestampObject> inputObjectCreator; - private final int numNoopFilters; - private int numWorkerThreads; - - public MethodCallThroughputAnalysis19(final int numWorkerThreads, final int numNoopFilters) { - this.numWorkerThreads = numWorkerThreads; - this.numNoopFilters = numNoopFilters; - } - - public void build() { - OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>> producerPipeline = this.buildProducerPipeline(this.numInputObjects, - this.inputObjectCreator); - addThreadableStage(producerPipeline); - - this.numWorkerThreads = Math.min(NUM_WORKER_THREADS, this.numWorkerThreads); - - for (int i = 0; i < numWorkerThreads; i++) { - List<TimestampObject> resultList = new ArrayList<TimestampObject>(this.numInputObjects); - this.timestampObjectsList.add(resultList); - - OldHeadPipeline<?, ?> pipeline = this.buildPipeline(producerPipeline.getLastStage(), resultList); - addThreadableStage(pipeline); - } - } - - private OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>> buildProducerPipeline(final int numInputObjects, - final ConstructorClosure<TimestampObject> inputObjectCreator) { - final ObjectProducer<TimestampObject> objectProducer = new ObjectProducer<TimestampObject>(numInputObjects, inputObjectCreator); - Distributor<TimestampObject> distributor = new Distributor<TimestampObject>(); - - final OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>> pipeline = new OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>>(); - pipeline.setFirstStage(objectProducer); - pipeline.setLastStage(distributor); - - OrderedGrowableArrayPipe.connect(objectProducer.getOutputPort(), distributor.getInputPort()); - - return pipeline; - } - - private OldHeadPipeline<?, ?> buildPipeline(final Distributor<TimestampObject> previousStage, final List<TimestampObject> timestampObjects) { - Relay<TimestampObject> relay = new Relay<TimestampObject>(); - @SuppressWarnings("unchecked") - final NoopFilter<TimestampObject>[] noopFilters = new NoopFilter[this.numNoopFilters]; - // create stages - final StartTimestampFilter startTimestampFilter = new StartTimestampFilter(); - for (int i = 0; i < noopFilters.length; i++) { - noopFilters[i] = new NoopFilter<TimestampObject>(); - } - final StopTimestampFilter stopTimestampFilter = new StopTimestampFilter(); - EveryXthPrinter<TimestampObject> everyXthPrinter = new EveryXthPrinter<TimestampObject>(100000); - final CollectorSink<TimestampObject> collectorSink = new CollectorSink<TimestampObject>(timestampObjects); - - final OldHeadPipeline<Relay<TimestampObject>, CollectorSink<TimestampObject>> pipeline = new OldHeadPipeline<Relay<TimestampObject>, CollectorSink<TimestampObject>>(); - pipeline.setFirstStage(relay); - pipeline.setLastStage(collectorSink); - - SpScPipe.connect(previousStage.getNewOutputPort(), relay.getInputPort(), SPSC_INITIAL_CAPACITY); - - OrderedGrowableArrayPipe.connect(relay.getOutputPort(), startTimestampFilter.getInputPort()); - - OrderedGrowableArrayPipe.connect(startTimestampFilter.getOutputPort(), noopFilters[0].getInputPort()); - for (int i = 0; i < noopFilters.length - 1; i++) { - OrderedGrowableArrayPipe.connect(noopFilters[i].getOutputPort(), noopFilters[i + 1].getInputPort()); - } - OrderedGrowableArrayPipe.connect(noopFilters[noopFilters.length - 1].getOutputPort(), stopTimestampFilter.getInputPort()); - OrderedGrowableArrayPipe.connect(stopTimestampFilter.getOutputPort(), everyXthPrinter.getInputPort()); - OrderedGrowableArrayPipe.connect(everyXthPrinter.getNewOutputPort(), collectorSink.getInputPort()); - - return pipeline; - } - - public void setInput(final int numInputObjects, final ConstructorClosure<TimestampObject> inputObjectCreator) { - this.numInputObjects = numInputObjects; - this.inputObjectCreator = inputObjectCreator; - } - - public int getNumNoopFilters() { - return this.numNoopFilters; - } - - public List<List<TimestampObject>> getTimestampObjectsList() { - return this.timestampObjectsList; - } - - public int getNumWorkerThreads() { - return this.numWorkerThreads; - } - -} diff --git a/src/performancetest/java/teetime/examples/loopStage/Countdown.java b/src/performancetest/java/teetime/examples/loopStage/Countdown.java deleted file mode 100644 index 8f5323e5d9ac71c119f8900aed6d606601158fda..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/loopStage/Countdown.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.loopStage; - -import teetime.framework.AbstractProducerStage; -import teetime.framework.InputPort; -import teetime.framework.OutputPort; - -public class Countdown extends AbstractProducerStage<Void> { - - private final InputPort<Integer> countdownInputPort = this.createInputPort(); - - private final OutputPort<Integer> newCountdownOutputPort = this.createOutputPort(); - - private final Integer initialCountdown; - - public Countdown(final Integer initialCountdown) { - this.initialCountdown = initialCountdown; - } - - @Override - public void onStarting() throws Exception { - super.onStarting(); - this.countdownInputPort.getPipe().add(this.initialCountdown); - } - - @Override - protected void execute() { - Integer countdown = this.countdownInputPort.receive(); - if (countdown == 0) { - outputPort.send(null); - this.terminate(); - } else { - newCountdownOutputPort.send(--countdown); - } - } - - public InputPort<Integer> getCountdownInputPort() { - return this.countdownInputPort; - } - - public OutputPort<Integer> getNewCountdownOutputPort() { - return this.newCountdownOutputPort; - } - -} diff --git a/src/performancetest/java/teetime/examples/loopStage/FiniteSignalPassingTest.java b/src/performancetest/java/teetime/examples/loopStage/FiniteSignalPassingTest.java deleted file mode 100644 index 104c58b6dbcaaefcfd6fdcd8f34c66ee0dd81155..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/loopStage/FiniteSignalPassingTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.loopStage; - -import static org.junit.Assert.assertFalse; - -import org.junit.Test; - -import teetime.framework.Analysis; - -public class FiniteSignalPassingTest { - - @Test(timeout = 5000) - // may not run infinitely, so we set an arbitrary timeout that is high enough - public void testStartSignalDoesNotEndUpInInfiniteLoop() throws Exception { - boolean exceptionsOccured = false; - LoopStageAnalysisConfiguration configuration = new LoopStageAnalysisConfiguration(); - Analysis analysis = new Analysis(configuration); - try { - analysis.executeBlocking(); - } catch (RuntimeException e) { - exceptionsOccured = true; - } - assertFalse(exceptionsOccured); - } -} diff --git a/src/performancetest/java/teetime/examples/loopStage/LoopStageAnalysisConfiguration.java b/src/performancetest/java/teetime/examples/loopStage/LoopStageAnalysisConfiguration.java deleted file mode 100644 index 3978b766fae83c61cec12a5948e95cbc5543ab60..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/examples/loopStage/LoopStageAnalysisConfiguration.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.examples.loopStage; - -import teetime.framework.AnalysisConfiguration; - -public class LoopStageAnalysisConfiguration extends AnalysisConfiguration { - - public LoopStageAnalysisConfiguration() { - Countdown countdown = new Countdown(10); - - connectIntraThreads(countdown.getNewCountdownOutputPort(), countdown.getCountdownInputPort()); - - // this.getFiniteProducerStages().add(countdown); - this.addThreadableStage(countdown); - } -} diff --git a/src/performancetest/java/teetime/framework/OldHeadPipeline.java b/src/performancetest/java/teetime/framework/OldHeadPipeline.java deleted file mode 100644 index 3bad88048cb30c8ab46b04b3b2b9b37dcd474aab..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/framework/OldHeadPipeline.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.framework; - -@Deprecated -public final class OldHeadPipeline<FirstStage extends Stage, LastStage extends Stage> extends OldPipeline<FirstStage, LastStage> { - - public OldHeadPipeline() {} - - public OldHeadPipeline(final String name) {} - -} diff --git a/src/performancetest/java/teetime/framework/OldPipeline.java b/src/performancetest/java/teetime/framework/OldPipeline.java deleted file mode 100644 index dbe5acc84c8b5fb763bc8d03810fcf7c4ba14694..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/framework/OldPipeline.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.framework; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -@Deprecated -public class OldPipeline<FirstStage extends Stage, LastStage extends Stage> extends AbstractCompositeStage { - - protected FirstStage firstStage; - private final List<LastStage> lastStages = new ArrayList<LastStage>(); - - @Override - public FirstStage getFirstStage() { - return this.firstStage; - } - - public void setFirstStage(final FirstStage firstStage) { - this.firstStage = firstStage; - } - - public void setLastStage(final LastStage lastStage) { - this.lastStages.clear(); - this.lastStages.add(lastStage); - } - - public LastStage getLastStage() { - return lastStages.get(0); - } - - @Override - protected Collection<? extends Stage> getLastStages() { - return lastStages; - } - -} diff --git a/src/performancetest/java/teetime/runtime/typeCheck/ConnectionTypeTest.java b/src/performancetest/java/teetime/runtime/typeCheck/ConnectionTypeTest.java deleted file mode 100644 index 5261ec6e27a662636c9b27df2e92f54f86fb1a75..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/runtime/typeCheck/ConnectionTypeTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.runtime.typeCheck; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -import org.junit.Test; - -import teetime.framework.pipe.IPipeFactory; -import teetime.framework.pipe.PipeFactoryRegistry; -import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering; -import teetime.framework.pipe.PipeFactoryRegistry.ThreadCommunication; -import teetime.stage.ObjectProducer; -import teetime.stage.PortTypeConfiguration; -import teetime.stage.StartTimestampFilter; -import teetime.stage.StopTimestampFilter; -import teetime.stage.basic.Sink; -import teetime.util.ConstructorClosure; -import teetime.util.TimestampObject; - -public class ConnectionTypeTest { - - private final PipeFactoryRegistry pipeFactory = PipeFactoryRegistry.INSTANCE; - - // tests for load-time validation - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Test - public void testDynamicPortConnection() throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, - IllegalArgumentException, InvocationTargetException, ClassNotFoundException { - ConstructorClosure<TimestampObject> constructorClosure = new ConstructorClosure<TimestampObject>() { - @Override - public TimestampObject create() { - return new TimestampObject(); - } - - }; - - Constructor<ObjectProducer> constructor = ObjectProducer.class.getConstructor(long.class, ConstructorClosure.class); - - ObjectProducer objectProducer = constructor.newInstance(1, constructorClosure); - // PortTypeConfiguration.setPortTypes(objectProducer, Class.forName("teetime.variant.explicitScheduling.examples.throughput.TimestampObject")); - - StartTimestampFilter startTimestampFilter = StartTimestampFilter.class.newInstance(); - StopTimestampFilter stopTimestampFilter = StopTimestampFilter.class.newInstance(); - Sink sink = Sink.class.newInstance(); - - IPipeFactory factory = this.pipeFactory.getPipeFactory(ThreadCommunication.INTRA, PipeOrdering.QUEUE_BASED, true); - factory.create(objectProducer.getOutputPort(), startTimestampFilter.getInputPort()); - factory.create(startTimestampFilter.getOutputPort(), stopTimestampFilter.getInputPort()); - factory.create(stopTimestampFilter.getOutputPort(), sink.getInputPort()); - - // TypeVariable<Class<ObjectProducer>>[] objectProducerTypeParameters = ObjectProducer.class.getTypeParameters(); - // for (TypeVariable<Class<ObjectProducer>> typeVariable : objectProducerTypeParameters) { - // System.out.println(typeVariable.getBounds()); // ->[Ljava.lang.reflect.Type;@13a65d1f - // System.out.println(typeVariable.getBounds().length); // ->1 - // System.out.println(typeVariable.getBounds()[0]); // ->class java.lang.Object - // System.out.println(typeVariable.getName()); // ->T - // System.out.println(typeVariable.getClass()); // ->class sun.reflect.generics.reflectiveObjects.TypeVariableImpl - // System.out.println(typeVariable.getGenericDeclaration()); // ->class teetime.stage.ObjectProducer - // } - // - // Class<?> currentClass = objectProducer.getClass(); - // while (currentClass.getSuperclass() != null) { // we don't want to process Object.class - // Field[] fields = currentClass.getDeclaredFields(); - // for (Field field : fields) { - // // System.out.println("Field: " + field.getType()); - // if (OutputPort.class.equals(field.getType())) { - // System.out.println("Field.name: " + field.getName()); - // System.out.println("Field.type: " + field.getType()); - // // field.getType() - // } - // } - // - // currentClass = currentClass.getSuperclass(); - // } - - assertNull(objectProducer.getOutputPort().getType()); - PortTypeConfiguration.setPortTypes(objectProducer, Class.forName(TimestampObject.class.getName())); - assertEquals(TimestampObject.class, objectProducer.getOutputPort().getType()); - - assertNull(startTimestampFilter.getOutputPort().getType()); - PortTypeConfiguration.setPortTypes(startTimestampFilter); - assertEquals(TimestampObject.class, startTimestampFilter.getInputPort().getType()); - assertEquals(TimestampObject.class, startTimestampFilter.getOutputPort().getType()); - } -} diff --git a/src/performancetest/java/teetime/util/CircularCollectionsTest.java b/src/performancetest/java/teetime/util/CircularCollectionsTest.java deleted file mode 100644 index 05e89769b28e75d5f26d63e5b931fd90096caac9..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/util/CircularCollectionsTest.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.util; - -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.lessThan; -import static org.junit.Assert.assertThat; - -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.concurrent.TimeUnit; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.FixMethodOrder; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestRule; -import org.junit.rules.TestWatcher; -import org.junit.runner.Description; -import org.junit.runners.MethodSorters; - -import teetime.util.concurrent.workstealing.CircularArray; -import teetime.util.concurrent.workstealing.CircularIntArray; -import teetime.util.concurrent.workstealing.CircularModIntArray; -import teetime.util.list.CircularList; - -@FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class CircularCollectionsTest { - - private static final int NUM_OBJECTS_TO_CREATE_IN_POW2 = 2; - private static final int NUM_OBJECTS_TO_CREATE = (int) Math.pow(2, NUM_OBJECTS_TO_CREATE_IN_POW2); - private static final int NUM_ACCESSES = 100000000; - private static final int WARMUP_ITERATIONS = 3; - - private static final Map<String, Long> durations = new LinkedHashMap<String, Long>(); - - private StopWatch stopWatch; - protected Description description; - - @Before - public void setup() { - this.stopWatch = new StopWatch(); - } - - @Rule - public final TestRule watcher = new TestWatcher() { - @Override - protected void starting(final Description description) { - CircularCollectionsTest.this.description = description; - } - }; - - @After - public void tearDown() { - CircularCollectionsTest.durations.put(this.description.getDisplayName(), this.stopWatch.getDurationInNs()); - } - - @Test - public void testCircularIntArray() throws Exception { - CircularIntArray<Object> circularArray = new CircularIntArray<Object>(NUM_OBJECTS_TO_CREATE_IN_POW2); - for (int i = 0; i < NUM_OBJECTS_TO_CREATE; i++) { - circularArray.put(i, new Object()); - } - - int warmupIterations = WARMUP_ITERATIONS; - while (warmupIterations-- > 0) { - for (int i = 0; i < NUM_ACCESSES; i++) { - circularArray.getNext().toString(); - } - } - - this.stopWatch.start(); - for (int i = 0; i < NUM_ACCESSES; i++) { - circularArray.getNext().toString(); - } - this.stopWatch.end(); - } - - @Test - public void testCircularModIntArray() throws Exception { - CircularModIntArray<Object> circularArray = new CircularModIntArray<Object>(NUM_OBJECTS_TO_CREATE_IN_POW2); - for (int i = 0; i < NUM_OBJECTS_TO_CREATE; i++) { - circularArray.put(i, new Object()); - } - - int warmupIterations = WARMUP_ITERATIONS; - while (warmupIterations-- > 0) { - for (int i = 0; i < NUM_ACCESSES; i++) { - circularArray.getNext().toString(); - } - } - - this.stopWatch.start(); - for (int i = 0; i < NUM_ACCESSES; i++) { - circularArray.getNext().toString(); - } - this.stopWatch.end(); - } - - @Test - public void testCircularList() throws Exception { - CircularList<Object> circularList = new CircularList<Object>(); - for (int i = 0; i < NUM_OBJECTS_TO_CREATE; i++) { - circularList.add(new Object()); - } - - int warmupIterations = WARMUP_ITERATIONS; - while (warmupIterations-- > 0) { - for (int i = 0; i < NUM_ACCESSES; i++) { - circularList.getNext().toString(); - } - } - - this.stopWatch.start(); - for (int i = 0; i < NUM_ACCESSES; i++) { - circularList.getNext().toString(); - } - this.stopWatch.end(); - } - - @Test - public void testCircularLongArray() throws Exception { - CircularArray<Object> circularArray = new CircularArray<Object>(NUM_OBJECTS_TO_CREATE_IN_POW2); - for (int i = 0; i < NUM_OBJECTS_TO_CREATE; i++) { - circularArray.put(i, new Object()); - } - - int warmupIterations = WARMUP_ITERATIONS; - while (warmupIterations-- > 0) { - for (int i = 0; i < NUM_ACCESSES; i++) { - circularArray.getNext().toString(); - } - } - - this.stopWatch.start(); - for (int i = 0; i < NUM_ACCESSES; i++) { - circularArray.getNext().toString(); - } - this.stopWatch.end(); - } - - @AfterClass - public static void afterClass() { - Long circularIntArrayInNs = durations.get("testCircularIntArray(teetime.util.CircularCollectionsTest)"); - Long circularModIntArrayInNs = durations.get("testCircularModIntArray(teetime.util.CircularCollectionsTest)"); - Long circularListInNs = durations.get("testCircularList(teetime.util.CircularCollectionsTest)"); - Long circularLongArrayInNs = durations.get("testCircularLongArray(teetime.util.CircularCollectionsTest)"); - - for (Entry<String, Long> entry : durations.entrySet()) { - System.out.println(entry.getKey() + ": " + TimeUnit.NANOSECONDS.toMillis(entry.getValue()) + " ms"); - } - - assertThat(circularListInNs, is(lessThan(circularModIntArrayInNs))); - - // testCircularIntArray(teetime.util.CircularCollectionsTest): 13202 ms - // testCircularList(teetime.util.CircularCollectionsTest): 13957 ms - // testCircularLongArray(teetime.util.CircularCollectionsTest): 12620 ms - // testCircularModIntArray(teetime.util.CircularCollectionsTest): 14015 ms - } -} diff --git a/src/performancetest/java/teetime/util/StopWatchTest.java b/src/performancetest/java/teetime/util/StopWatchTest.java deleted file mode 100644 index 0adb42941a2ebf02b2d4cd6ce5cc5fc774eef481..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/util/StopWatchTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.util; - -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import org.junit.Test; - -import teetime.util.test.eval.StatisticsUtil; - -public class StopWatchTest { - - private static final int NUM_ITERATIONS = 1000000; - - @Test - public void testNanotime() throws Exception { - StopWatch iterationStopWatch = new StopWatch(); - - List<Long> durationsInNs = new ArrayList<Long>(NUM_ITERATIONS); - for (int i = 0; i < NUM_ITERATIONS; i++) { - iterationStopWatch.start(); - fib(BigInteger.valueOf(10l)); - iterationStopWatch.end(); - durationsInNs.add(iterationStopWatch.getDurationInNs()); - } - - Map<Double, Long> quintiles = StatisticsUtil.calculateQuintiles(durationsInNs); - StatisticsUtil.getQuantilesString(quintiles); - } - - public static BigInteger fib(final BigInteger n) { - if (n.compareTo(BigInteger.ONE) == -1 || n.compareTo(BigInteger.ONE) == 0) { - return n; - } else { - return fib(n.subtract(BigInteger.ONE)).add(fib(n.subtract(BigInteger.ONE).subtract(BigInteger.ONE))); - } - } -} diff --git a/src/performancetest/java/teetime/util/concurrent/CircularWorkStealingDequeTest.java b/src/performancetest/java/teetime/util/concurrent/CircularWorkStealingDequeTest.java deleted file mode 100644 index 90faa5832989af5d26dfeaebbf87555534617904..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/util/concurrent/CircularWorkStealingDequeTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.util.concurrent; - -import org.hamcrest.number.OrderingComparison; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -import teetime.util.StopWatch; -import teetime.util.concurrent.workstealing.CircularWorkStealingDeque; -import teetime.util.concurrent.workstealing.alternative.UntypedCircularWorkStealingDequeTest; - -public class CircularWorkStealingDequeTest { - private StopWatch stopWatch; - - @Before - public void before() { - this.stopWatch = new StopWatch(); - } - - @Test - public void measureManyEmptyPulls() { - final CircularWorkStealingDeque<Object> deque = new CircularWorkStealingDeque<Object>(); - - final int numIterations = UntypedCircularWorkStealingDequeTest.NUM_ITERATIONS; - this.stopWatch.start(); - for (int i = 0; i < numIterations; i++) { - deque.popBottom(); - } - this.stopWatch.end(); - - Assert.assertThat(this.stopWatch.getDurationInNs(), - OrderingComparison.lessThan(UntypedCircularWorkStealingDequeTest.EXPECTED_DURATION_IN_NS)); - } -} diff --git a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/CircularWorkStealingDequeTest.java b/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/CircularWorkStealingDequeTest.java deleted file mode 100644 index 37d2b33254a867a5b115840e8e8ea66d2cda714d..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/CircularWorkStealingDequeTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.util.concurrent.workstealing.alternative; - -import org.hamcrest.number.OrderingComparison; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -import teetime.util.StopWatch; -import teetime.util.concurrent.workstealing.CircularWorkStealingDeque; - -public class CircularWorkStealingDequeTest { - private StopWatch stopWatch; - - @Before - public void before() { - this.stopWatch = new StopWatch(); - } - - @Test - public void measureManyEmptyPulls() { - final CircularWorkStealingDeque<Object> deque = new CircularWorkStealingDeque<Object>(); - - final int numIterations = UntypedCircularWorkStealingDequeTest.NUM_ITERATIONS; - this.stopWatch.start(); - for (int i = 0; i < numIterations; i++) { - deque.popBottom(); - } - this.stopWatch.end(); - - Assert.assertThat(this.stopWatch.getDurationInNs(), OrderingComparison.lessThan(UntypedCircularWorkStealingDequeTest.EXPECTED_DURATION_IN_NS)); - } -} diff --git a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/CircularWorkStealingDequeWithSentinelTest.java b/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/CircularWorkStealingDequeWithSentinelTest.java deleted file mode 100644 index 3cf7d702d70d6c37eb1355a9e342e9e9462775f1..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/CircularWorkStealingDequeWithSentinelTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.util.concurrent.workstealing.alternative; - -import org.hamcrest.number.OrderingComparison; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -import teetime.util.StopWatch; - -public class CircularWorkStealingDequeWithSentinelTest { - private StopWatch stopWatch; - - @Before - public void before() { - this.stopWatch = new StopWatch(); - } - - @Test - public void measureManyEmptyPulls() { - final CircularWorkStealingDequeWithSentinel<Object> deque = new CircularWorkStealingDequeWithSentinel<Object>(); - - final int numIterations = UntypedCircularWorkStealingDequeTest.NUM_ITERATIONS; - this.stopWatch.start(); - for (int i = 0; i < numIterations; i++) { - deque.popBottom(); - // if (returnValue.getState() != State.EMPTY) { - // returnValue.getValue(); - // } - } - this.stopWatch.end(); - - Assert.assertThat(this.stopWatch.getDurationInNs(), OrderingComparison.lessThan(UntypedCircularWorkStealingDequeTest.EXPECTED_DURATION_IN_NS)); - } -} diff --git a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/CircularWorkStealingDequeWithThreadLocalSentinelTest.java b/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/CircularWorkStealingDequeWithThreadLocalSentinelTest.java deleted file mode 100644 index 8f6f65e7914da78af5d13e13be13bac7fa6ebebc..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/CircularWorkStealingDequeWithThreadLocalSentinelTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.util.concurrent.workstealing.alternative; - -import org.hamcrest.number.OrderingComparison; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -import teetime.util.StopWatch; - -public class CircularWorkStealingDequeWithThreadLocalSentinelTest { - private StopWatch stopWatch; - - @Before - public void before() { - this.stopWatch = new StopWatch(); - } - - @Test - public void measureManyEmptyPulls() { - final CircularWorkStealingDequeWithThreadLocalSentinel<Object> deque = new CircularWorkStealingDequeWithThreadLocalSentinel<Object>(); - - final int numIterations = UntypedCircularWorkStealingDequeTest.NUM_ITERATIONS; - this.stopWatch.start(); - for (int i = 0; i < numIterations; i++) { - deque.popBottom(); - // if (returnValue.getState() != State.EMPTY) { - // returnValue.getValue(); - // } - } - this.stopWatch.end(); - - Assert.assertThat(this.stopWatch.getDurationInNs(), OrderingComparison.lessThan(UntypedCircularWorkStealingDequeTest.EXPECTED_DURATION_IN_NS)); - } -} diff --git a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/ExceptionalCircularWorkStealingDequeTest.java b/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/ExceptionalCircularWorkStealingDequeTest.java deleted file mode 100644 index e29b80ef067361300f64cbf6495c855ee6834c26..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/ExceptionalCircularWorkStealingDequeTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.util.concurrent.workstealing.alternative; - -import org.hamcrest.number.OrderingComparison; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - -import teetime.util.StopWatch; -import teetime.util.concurrent.workstealing.exception.DequeIsEmptyException; - -@Ignore -public class ExceptionalCircularWorkStealingDequeTest { - - private StopWatch stopWatch; - - @Before - public void before() { - this.stopWatch = new StopWatch(); - } - - @Test - public void measureManyEmptyPulls() { - final ExceptionalCircularWorkStealingDeque<String> deque = new ExceptionalCircularWorkStealingDeque<String>(); - - final int numIterations = UntypedCircularWorkStealingDequeTest.NUM_ITERATIONS; - this.stopWatch.start(); - for (int i = 0; i < numIterations; i++) { - try { - deque.popBottom(); - } catch (final DequeIsEmptyException e) { - // do not handle; we just want to compare the performance of throwing a preallocated exception vs. returning special values - throw new IllegalStateException(e); - } - } - this.stopWatch.end(); - - Assert.assertThat(this.stopWatch.getDurationInNs(), OrderingComparison.lessThan(UntypedCircularWorkStealingDequeTest.EXPECTED_DURATION_IN_NS)); - } -} diff --git a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/UntypedCircularWorkStealingDequeTest.java b/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/UntypedCircularWorkStealingDequeTest.java deleted file mode 100644 index b60f8ccb8ee04ca9f7e7b92fceffd0d18b23d7fe..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/UntypedCircularWorkStealingDequeTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.util.concurrent.workstealing.alternative; - -import org.hamcrest.number.OrderingComparison; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -import teetime.util.StopWatch; - -public class UntypedCircularWorkStealingDequeTest { - - public static final int NUM_ITERATIONS = 100000000; - public static final long EXPECTED_DURATION_IN_NS = 1100*1000*1000; - - private StopWatch stopWatch; - - @Before - public void before() { - this.stopWatch = new StopWatch(); - } - - @Test - public void measureManyEmptyPulls() { - final UntypedCircularWorkStealingDeque deque = new UntypedCircularWorkStealingDeque(); - - final int numIterations = NUM_ITERATIONS; - this.stopWatch.start(); - for (int i = 0; i < numIterations; i++) { - deque.popBottom(); - } - this.stopWatch.end(); - - Assert.assertThat(this.stopWatch.getDurationInNs(), OrderingComparison.lessThan(UntypedCircularWorkStealingDequeTest.EXPECTED_DURATION_IN_NS)); - } -} diff --git a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/UntypedExceptionalCircularWorkStealingDequeTest.java b/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/UntypedExceptionalCircularWorkStealingDequeTest.java deleted file mode 100644 index 1a356438fd3c1485ed18fbf838280e58b3ebf9cd..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/util/concurrent/workstealing/alternative/UntypedExceptionalCircularWorkStealingDequeTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.util.concurrent.workstealing.alternative; - -import org.hamcrest.number.OrderingComparison; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -import teetime.util.StopWatch; -import teetime.util.concurrent.workstealing.exception.DequeIsEmptyException; - -public class UntypedExceptionalCircularWorkStealingDequeTest { - - private StopWatch stopWatch; - - @Before - public void before() { - this.stopWatch = new StopWatch(); - } - - @Test - public void measureManyEmptyPulls() { - final UntypedExceptionalCircularWorkStealingDeque deque = new UntypedExceptionalCircularWorkStealingDeque(); - System.out.println(UntypedExceptionalCircularWorkStealingDeque.DEQUE_IS_EMPTY_EXCEPTION); - System.out.println(UntypedExceptionalCircularWorkStealingDeque.OPERATION_ABORTED_EXCEPTION); - - int counter = 0; - final int numIterations = UntypedCircularWorkStealingDequeTest.NUM_ITERATIONS; - this.stopWatch.start(); - for (int i = 0; i < numIterations; i++) { - try { - deque.popBottom(); - } catch (final DequeIsEmptyException e) { - // do not handle; we just want to compare the performance of throwing a preallocated exception vs. returning special values - counter++; - } - } - this.stopWatch.end(); - - Assert.assertThat(this.stopWatch.getDurationInNs(), OrderingComparison.lessThan(UntypedCircularWorkStealingDequeTest.EXPECTED_DURATION_IN_NS)); - Assert.assertThat(counter, OrderingComparison.comparesEqualTo(UntypedCircularWorkStealingDequeTest.NUM_ITERATIONS)); - } -} diff --git a/src/performancetest/java/teetime/util/list/CommittableResizableArrayQueueTest.java b/src/performancetest/java/teetime/util/list/CommittableResizableArrayQueueTest.java deleted file mode 100644 index d2ed2557fe34ac046b6d384a52a58d2c3bb2e9e1..0000000000000000000000000000000000000000 --- a/src/performancetest/java/teetime/util/list/CommittableResizableArrayQueueTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (C) 2015 Christian Wulf, Nelson Tavares de Sousa (http://teetime.sourceforge.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package teetime.util.list; - -import org.junit.Assert; -import org.junit.Test; - -public class CommittableResizableArrayQueueTest { - - @Test - public void testCommit() throws Exception { - CommittableResizableArrayQueue<Object> reservableArrayList = new CommittableResizableArrayQueue<Object>(null, 10); - Object element = new Object(); - reservableArrayList.addToTailUncommitted(element); - - Assert.assertTrue(reservableArrayList.isEmpty()); - - reservableArrayList.commit(); - - Assert.assertFalse(reservableArrayList.isEmpty()); - Assert.assertEquals(element, reservableArrayList.getTail()); - } - - @Test - public void testRollback() throws Exception { - CommittableResizableArrayQueue<Object> reservableArrayList = new CommittableResizableArrayQueue<Object>(null, 10); - Object element = new Object(); - reservableArrayList.addToTailUncommitted(element); - - Assert.assertTrue(reservableArrayList.isEmpty()); - - reservableArrayList.rollback(); - - Assert.assertTrue(reservableArrayList.isEmpty()); - // Assert.assertEquals(element, reservableArrayList.getLast()); - } - - @Test - public void testRemove() throws Exception { - CommittableResizableArrayQueue<Object> reservableArrayList = new CommittableResizableArrayQueue<Object>(null, 10); - Object element = new Object(); - reservableArrayList.addToTailUncommitted(element); - reservableArrayList.commit(); - - Assert.assertEquals(element, reservableArrayList.removeFromHeadUncommitted()); - Assert.assertFalse(reservableArrayList.isEmpty()); - - reservableArrayList.commit(); - - Assert.assertTrue(reservableArrayList.isEmpty()); - } -}