diff --git a/report/benchmarks/bus-analytics/1.sh b/report/benchmarks/bus-analytics/1.sh new file mode 100755 index 00000000..7481c75f --- /dev/null +++ b/report/benchmarks/bus-analytics/1.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# Vehicles on the road per day + +cat $INPUT_FILE | sed 's/T..:..:..//' | cut -d ',' -f 1,3 | sort -u | cut -d ',' -f 1 | sort | uniq -c | awk -v OFS="\t" "{print \$2,\$1}" diff --git a/report/benchmarks/bus-analytics/2.sh b/report/benchmarks/bus-analytics/2.sh new file mode 100755 index 00000000..01488b52 --- /dev/null +++ b/report/benchmarks/bus-analytics/2.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Days a vehicle is on the road + +cat $INPUT_FILE | + sed 's/T..:..:..//' | + cut -d ',' -f 3,1 | + sort -u | + cut -d ',' -f 2 | + sort | + uniq -c | + sort -k1n | + awk -v OFS="\t" "{print \$2,\$1}" diff --git a/report/benchmarks/bus-analytics/3.sh b/report/benchmarks/bus-analytics/3.sh new file mode 100755 index 00000000..0f916203 --- /dev/null +++ b/report/benchmarks/bus-analytics/3.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Hours each vehicle is on the road + +cat $INPUT_FILE | + sed 's/T\(..\):..:../,\1/' | + cut -d ',' -f 1,2,4 | + sort -u | + cut -d ',' -f 3 | + sort | + uniq -c | + sort -k1n | + awk -v OFS="\t" "{print \$2,\$1}" \ No newline at end of file diff --git a/report/benchmarks/bus-analytics/4.sh b/report/benchmarks/bus-analytics/4.sh new file mode 100755 index 00000000..8189102c --- /dev/null +++ b/report/benchmarks/bus-analytics/4.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Hours monitored each day + +cat $INPUT_FILE | + sed 's/T\(..\):..:../,\1/' | + cut -d ',' -f 1,2 | + sort -u | + cut -d ',' -f 1 | + sort | + uniq -c | + awk -v OFS="\t" "{print \$2,\$1}" diff --git a/report/benchmarks/bus-analytics/5.sh b/report/benchmarks/bus-analytics/5.sh new file mode 100755 index 00000000..0b5936ba --- /dev/null +++ b/report/benchmarks/bus-analytics/5.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Hours each bus is active each day + +# Records are day, hour, line, bus +<$INPUT_FILE sed 's/T\(..\):..:../,\1/' | awk -F, ' +!seen[$1 $2 $4] { seen[$1 $2 $4] = 1; hours[$1 $4]++; bus[$4] = 1; day[$1] = 1; } +END { + PROCINPUT_FILEFO["sorted_in"] = "@ind_str_asc" + for (d in day) + printf("\t%s", d); + printf("\n"); + for (b in bus) { + printf("%s", b); + for (d in day) + printf("\t%s", hours[d b]); + printf("\n"); + } +}' > out \ No newline at end of file diff --git a/report/benchmarks/bus-analytics/README.md b/report/benchmarks/bus-analytics/README.md new file mode 100644 index 00000000..f74d81e5 --- /dev/null +++ b/report/benchmarks/bus-analytics/README.md @@ -0,0 +1,9 @@ +# Mass-Transport System Analytics + +This set of scripts script is part of [a recent study on OASA](https://insidestory.gr/article/noymera-leoforeia-athinas) from Diomidis Spinellis and Eleftheria Tsaliki. OASA is the the mass-transport system supporting the city of Athens. + +1. `1.sh`: Vehicles on the road per day +2. `2.sh`: Days a vehicle is on the road +3. `3.sh`: Hours each vehicle is on the road +4. `4.sh`: Hours monitored each day +5. `5.sh`: Hours each bus is active each day diff --git a/report/benchmarks/bus-analytics/full.sh b/report/benchmarks/bus-analytics/full.sh new file mode 100755 index 00000000..897d9140 --- /dev/null +++ b/report/benchmarks/bus-analytics/full.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +# full bus analytics script + +# 1.sh Vehicles on the road per day +cat $INPUT_FILE | + sed 's/T..:..:..//' | + cut -d ',' -f 1,3 | + sort -u | + cut -d ',' -f 1 | + sort | + uniq -c | + awk -v OFS="\t" "{print \$2,\$1}" + +# 2.sh Days a vehicle is on the road +cat $INPUT_FILE | + sed 's/T..:..:..//' | + cut -d ',' -f 3,1 | + sort -u | + cut -d ',' -f 2 | + sort | + uniq -c | + sort -k1n | + awk -v OFS="\t" "{print \$2,\$1}" + +# 3.sh Hours each vehicle is on the road +cat $INPUT_FILE | + sed 's/T\(..\):..:../,\1/' | + cut -d ',' -f 1,2,4 | + sort -u | + cut -d ',' -f 3 | + sort | + uniq -c | + sort -k1n | + awk -v OFS="\t" "{print \$2,\$1}" + +# 4.sh -- Hours monitored each day +cat $INPUT_FILE | + sed 's/T\(..\):..:../,\1/' | + cut -d ',' -f 1,2 | + sort -u | + cut -d ',' -f 1 | + sort | + uniq -c | + awk -v OFS="\t" "{print \$2,\$1}" + +# 5.sh -- Records are day, hour, line, bus +<$INPUT_FILE sed 's/T\(..\):..:../,\1/' | awk -F, ' +!seen[$1 $2 $4] { seen[$1 $2 $4] = 1; hours[$1 $4]++; bus[$4] = 1; day[$1] = 1; } +END { + PROCINPUT_FILEFO["sorted_in"] = "@ind_str_asc" + for (d in day) + printf("\t%s", d); + printf("\n"); + for (b in bus) { + printf("%s", b); + for (d in day) + printf("\t%s", hours[d b]); + printf("\n"); + } +}' > out diff --git a/report/benchmarks/bus-analytics/out b/report/benchmarks/bus-analytics/out new file mode 100644 index 00000000..02233424 --- /dev/null +++ b/report/benchmarks/bus-analytics/out @@ -0,0 +1,1193 @@ + 2020-01-21 2020-01-20 +30723 3 6 +79166 3 7 +10413 3 +10602 4 2 +10199 3 +06101 3 +07025 3 +50335 3 4 +30654 2 +89001 3 10 +40419 3 6 +10595 3 +10087 3 9 +79158 3 +60497 3 10 +30931 9 +60523 8 +60896 1 9 +40429 3 10 +30808 3 10 +79050 3 10 +79191 3 6 +10147 3 2 +89022 2 5 +10741 1 +10720 3 10 +10962 3 6 +40448 3 6 +10647 3 5 +60510 3 7 +30829 3 10 +79071 3 2 +88013 3 7 +30270 1 8 +07056 1 10 +40822 4 +10813 3 10 +10365 3 +10167 3 +79100 3 10 +30679 3 8 +07048 3 +60227 1 +40166 1 10 +50703 10 +30846 10 +40849 6 +10182 3 10 +40709 3 +79161 3 9 +30863 3 6 +79028 3 10 +60488 3 10 +65146 3 10 +79137 3 9 +79142 4 10 +88054 4 7 +10136 3 2 +07019 3 +89035 3 8 +50309 4 10 +30750 4 10 +60548 9 +10399 4 +50315 3 1 +40422 4 10 +40893 3 6 +30803 3 6 +30894 3 9 +30634 3 10 +60932 3 9 +88080 3 +89029 3 8 +10214 8 +06083 3 8 +79092 3 10 +79117 3 10 +30855 3 7 +30820 3 6 +10156 3 10 +79078 3 9 +60519 3 8 +10729 3 8 +50224 10 +10663 3 2 +50322 3 7 +10007 3 1 +30948 4 10 +40460 3 7 +30661 3 +30874 3 10 +60970 3 3 +50245 1 10 +40587 1 10 +30923 3 6 +50293 4 10 +89013 3 4 +10705 3 7 +79168 4 10 +79021 3 +40700 3 10 +10114 10 +10091 10 +07108 1 10 +07012 1 9 +50302 10 +10952 3 9 +40557 7 10 +30965 3 10 +79089 3 10 +30785 3 8 +30882 3 1 +65109 1 10 +40438 10 +10202 9 +10541 8 +07084 6 +06039 3 3 +65115 3 +07058 3 +50223 9 +79095 6 +10806 3 5 +30668 2 +40858 7 7 +30941 3 10 +60979 3 7 +10107 1 10 +10172 8 +50184 3 8 +40884 7 9 +30735 3 1 +30814 3 3 +30740 3 +79156 3 10 +79039 3 10 +40417 1 10 +10089 10 +10197 6 +07093 3 8 +50318 3 7 +07008 3 +30899 3 10 +79122 3 9 +30914 3 10 +79056 3 7 +60890 3 10 +88063 3 +50974 10 +30639 9 +07061 3 2 +50234 3 10 +40558 3 10 +79086 3 +30764 3 10 +79068 3 10 +88091 3 8 +65173 4 10 +40437 6 +10675 3 9 +10011 3 8 +40717 3 8 +30978 3 10 +79014 3 10 +40591 3 9 +40836 3 +30606 3 7 +60940 3 10 +10976 3 9 +07042 1 10 +89048 9 +40450 7 +79167 3 7 +60961 4 9 +40471 3 10 +30959 3 9 +77082 4 7 +60914 3 9 +30722 7 10 +50219 3 8 +60524 3 8 +30653 3 8 +10592 3 +40863 3 7 +60490 3 10 +79030 3 10 +30749 3 10 +88045 1 10 +50956 1 10 +50332 8 +40561 3 8 +40899 3 7 +79190 4 10 +30913 3 10 +79051 3 10 +79125 3 9 +60897 3 9 +10146 3 8 +07094 1 10 +88064 10 +30809 10 +40428 3 +06089 3 +10961 3 8 +60513 4 10 +65118 3 10 +79007 2 6 +10644 9 +50345 6 +07049 3 +50702 3 1 +89043 3 6 +30973 3 10 +79101 3 8 +30793 3 9 +40848 3 10 +10166 3 10 +06095 1 10 +10812 8 +10112 3 8 +50295 3 7 +40478 3 8 +79027 4 10 +10703 3 +60968 3 6 +60982 7 10 +60533 3 8 +10097 1 3 +50308 3 10 +07018 3 +10331 3 +79136 3 10 +60880 3 9 +79143 3 6 +30751 3 7 +10137 2 10 +10384 10 +07102 9 +50190 4 10 +88083 3 +50316 3 10 +40421 3 8 +79199 3 10 +79058 3 10 +10217 2 +65165 3 7 +10622 2 +10947 4 +50225 3 6 +79116 3 2 +79093 4 10 +30775 7 10 +10728 3 10 +10157 10 +30821 4 +65130 3 7 +50325 3 6 +07035 3 9 +40467 3 8 +60977 3 +50242 4 10 +10664 3 6 +10109 10 +10611 8 +88033 3 7 +30957 3 3 +30254 10 +79020 9 +60540 1 +65154 1 +50301 3 +07011 3 +50176 7 10 +10635 3 +60889 3 10 +30758 3 9 +30646 3 +30964 3 9 +79181 3 9 +69005 3 9 +40556 4 10 +60929 7 10 +79066 3 7 +10953 4 3 +07085 10 +10970 3 7 +30675 3 +10017 3 3 +40711 3 +30709 4 10 +10220 3 8 +40456 3 8 +60946 3 7 +40597 1 10 +07044 8 +30940 3 10 +40468 4 10 +79172 4 10 +10106 3 6 +88024 3 9 +10173 3 9 +10681 10 +30736 1 7 +50213 3 10 +40920 7 9 +40414 3 +50187 3 8 +10121 3 10 +07028 3 +10194 9 +10395 4 7 +50319 3 +10746 3 8 +79123 4 10 +30638 3 7 +30915 4 10 +10948 3 +30898 3 9 +40901 3 10 +79057 3 10 +10140 3 10 +79196 3 10 +07092 10 +60891 10 +88062 7 +07112 3 +30837 3 10 +30763 3 +79081 3 7 +65174 3 6 +60920 3 6 +79188 3 6 +88009 2 10 +10655 10 +07043 3 10 +10010 3 9 +40716 3 8 +79015 3 6 +10977 4 10 +65120 4 10 +60291 3 6 +50708 3 +30799 1 10 +10709 3 +40472 3 9 +10600 3 +65143 3 10 +30866 3 6 +60917 3 10 +10118 3 10 +60962 6 9 +30721 8 +50333 4 10 +06107 3 7 +50218 3 8 +07023 3 +30937 3 8 +10593 3 3 +79031 3 +60491 3 1 +60550 3 4 +60525 3 7 +10715 7 +88044 2 +10149 3 7 +88085 3 +07075 3 +40896 3 10 +60898 3 +60937 3 10 +50310 9 +30631 9 +50344 3 9 +79099 3 6 +10645 3 8 +07054 3 5 +65119 1 10 +50701 3 1 +10693 3 9 +40164 4 10 +30707 3 8 +30844 3 8 +30282 3 7 +10165 3 9 +65129 2 9 +10575 3 10 +89014 3 +30924 3 9 +79026 3 10 +10096 3 8 +40707 3 9 +88035 3 5 +60983 3 9 +50294 8 +50178 3 9 +40878 6 10 +79131 3 10 +60887 3 10 +79144 3 9 +40917 7 2 +30756 3 9 +10130 3 9 +88052 5 5 +07105 10 +79059 3 8 +07072 3 +07007 3 4 +50191 3 8 +50317 4 10 +30896 3 10 +60930 3 3 +10216 3 10 +65164 4 10 +30636 1 +40420 9 +30801 8 +88082 5 +10969 3 +50226 3 10 +10154 3 8 +79090 3 9 +79115 3 6 +40199 3 6 +30822 7 8 +30776 3 8 +30295 3 10 +60953 4 10 +65110 3 8 +88018 10 +30619 1 +50243 4 9 +30667 2 5 +10665 3 6 +50324 3 3 +10108 3 10 +40857 3 6 +60976 3 3 +06015 10 +07034 9 +30872 9 +30713 9 +10373 7 +10400 4 +50215 3 6 +40412 3 7 +10127 3 6 +30745 3 10 +30730 3 +60902 3 10 +60528 4 7 +50300 3 10 +40918 3 8 +79042 3 +30759 3 6 +60888 3 9 +10634 1 10 +65155 7 +50239 3 8 +10309 3 +30769 3 9 +30620 3 7 +79065 3 10 +88003 3 9 +10200 3 7 +10950 4 9 +07086 3 10 +40555 2 +06099 4 10 +07045 3 +40596 4 9 +10016 3 7 +40710 3 2 +79013 3 10 +30601 3 3 +40457 4 10 +40844 3 10 +10971 2 +30674 2 +10672 8 +06069 4 10 +40481 3 +10732 4 10 +65138 3 10 +60991 4 10 +88023 3 8 +10008 9 +10120 4 4 +50339 4 8 +10357 4 4 +07029 3 +50186 3 10 +50212 3 8 +10599 3 10 +40868 7 8 +79154 4 10 +30737 3 5 +30742 3 10 +30658 2 +89026 3 8 +40902 3 7 +60878 3 9 +30916 3 6 +10745 3 9 +79054 4 10 +79195 3 10 +10143 3 9 +40564 3 8 +60892 3 9 +07091 5 +50232 4 1 +30982 3 6 +30300 3 +30836 3 8 +30762 3 7 +79080 3 7 +88008 3 +60921 7 10 +79189 1 10 +65175 9 +10978 3 +50707 3 9 +06090 3 9 +30842 3 10 +40188 3 9 +40719 4 10 +30976 3 10 +10695 3 10 +10163 3 10 +10410 3 +30867 3 10 +30720 7 10 +65142 3 7 +40406 7 +79165 5 +10340 3 +89004 3 5 +79032 3 6 +77074 3 2 +10129 3 +10082 3 3 +40861 3 9 +10590 3 8 +88047 3 +50330 4 10 +07020 7 +10210 4 +40909 6 10 +40426 3 +30630 3 9 +30807 3 +88084 3 10 +60936 3 6 +65162 3 9 +07001 4 8 +30890 2 10 +10148 9 +10625 6 +50343 3 9 +30778 3 9 +30859 3 6 +79074 3 10 +10556 3 8 +10642 4 10 +60515 3 7 +10967 2 +40827 4 +07053 1 +06097 3 +89041 3 7 +65128 3 7 +30706 3 9 +30845 4 10 +10164 3 8 +40459 3 6 +50986 7 +10576 3 8 +06078 3 10 +50297 3 10 +10110 3 10 +88036 3 +30729 1 10 +89017 9 +50179 3 10 +88053 3 +79145 3 10 +30902 3 10 +40916 7 5 +10131 3 +40879 4 5 +89032 7 +79063 3 6 +10206 3 10 +79184 3 8 +30886 3 +88005 3 2 +10956 3 10 +89051 2 9 +88070 4 10 +10659 9 +30626 9 +40553 7 +07080 5 +10559 3 6 +10968 3 3 +50227 4 10 +79114 3 10 +30777 3 +30618 3 +79091 3 7 +60952 3 6 +65111 3 10 +10155 7 +40442 7 +88019 6 +10569 4 10 +50327 3 10 +50240 3 7 +07037 3 6 +60975 3 6 +30710 3 10 +40854 4 7 +60508 4 10 +10738 2 10 +30664 2 +65132 1 10 +30871 1 10 +10587 6 +50180 3 7 +50214 3 10 +40880 3 7 +30731 3 6 +79152 3 8 +60903 3 8 +30810 3 10 +88048 3 +10719 3 6 +10193 7 +10126 10 +65152 3 7 +50307 4 10 +30640 3 +79045 4 10 +10138 3 +10633 4 10 +40575 2 6 +07017 6 +50238 3 10 +10308 3 +30966 3 6 +79183 3 10 +79064 3 8 +10542 3 +30786 3 7 +30768 6 10 +88002 7 10 +30881 9 +65125 3 5 +10972 3 10 +40847 7 7 +40713 3 10 +30677 3 4 +79010 3 2 +40595 3 9 +10169 7 +79174 3 9 +10733 3 6 +10100 3 9 +10562 3 +65139 3 10 +10801 3 6 +10175 3 5 +88022 9 +06068 9 +10009 7 +10618 2 +07026 3 9 +06102 3 10 +89002 3 6 +50336 3 +50282 3 5 +30932 3 9 +60520 3 10 +79034 3 4 +30657 2 10 +89027 3 7 +60879 3 9 +79121 4 10 +40565 3 +10142 3 8 +60893 3 6 +30917 9 +79194 8 +79055 6 +88060 6 +07110 3 +30888 3 8 +30981 4 10 +30628 3 10 +30761 3 6 +40432 3 +07064 4 10 +65103 3 10 +10958 3 9 +10208 1 10 +10694 3 10 +40718 4 10 +79105 3 8 +30797 3 10 +30843 3 10 +50706 7 7 +50299 3 +10578 3 10 +40140 3 5 +30860 3 +30727 3 +88038 3 10 +40474 4 10 +30929 1 10 +10606 7 +50331 3 9 +89005 3 10 +10128 3 10 +79033 3 +60493 3 3 +50285 3 7 +40860 4 9 +07021 1 10 +10591 9 +60527 8 +50312 3 +06056 3 10 +40124 3 4 +79128 3 8 +10626 3 10 +30893 3 3 +10213 3 10 +07099 3 4 +30633 3 +88087 3 7 +40196 3 2 +10966 3 4 +50342 3 +79075 3 10 +30858 4 10 +30779 3 6 +10643 3 +40530 3 9 +07052 3 +50246 3 7 +06010 4 10 +50321 4 10 +07031 3 10 +50996 3 8 +10615 3 9 +40463 3 5 +30716 3 +60973 3 10 +40852 5 8 +10581 1 10 +30877 6 +10178 5 +06079 3 +30926 4 10 +30728 3 10 +10094 3 7 +67122 3 +60981 3 9 +89016 3 +88037 7 +06049 3 +07107 3 +88050 3 +40915 7 2 +79133 3 9 +60885 3 10 +79146 3 10 +30901 3 10 +10381 3 3 +30754 4 10 +88071 3 +40552 3 +30960 4 10 +79185 4 10 +30780 3 1 +10207 3 +89050 1 10 +07081 10 +79062 7 +10957 7 +10658 2 +30824 3 9 +30851 3 5 +30770 3 10 +60955 3 +10152 1 7 +79113 1 10 +79096 10 +65116 6 +40150 3 +50241 4 10 +10586 3 +40464 4 10 +30870 3 6 +60509 2 8 +88028 3 8 +10612 3 10 +10371 1 8 +40855 9 +10667 3 +50288 4 10 +40883 3 8 +50217 3 5 +10402 3 +10327 3 +60900 3 10 +30938 3 9 +30747 3 6 +79151 3 10 +10125 3 10 +30732 2 10 +89008 10 +40574 3 4 +79138 3 10 +40871 3 10 +10139 3 9 +65153 3 6 +30641 10 +07088 3 10 +50237 3 +88078 3 +60924 7 10 +30969 3 6 +30833 3 5 +30767 3 3 +79085 3 10 +30789 3 9 +65170 3 7 +10651 3 8 +40434 1 10 +30849 3 9 +40594 3 +10014 2 5 +60945 7 10 +40455 3 10 +65124 3 10 +10168 1 8 +40846 1 10 +07047 10 +10561 3 7 +40483 3 +40227 3 +30879 3 7 +10730 3 10 +30718 3 +79177 3 7 +10103 3 +60500 3 8 +60993 3 10 +10176 2 +07027 1 9 +50283 3 10 +50188 3 4 +88040 3 4 +10085 3 +10409 3 10 +30933 3 9 +30739 3 3 +30656 3 10 +60495 3 4 +10597 3 +60521 4 4 +89003 1 10 +10743 3 +06058 4 10 +79126 3 10 +30910 3 +79052 3 10 +40904 7 9 +10145 3 +79193 4 10 +88089 3 4 +07097 1 10 +89020 5 +30980 3 7 +30760 3 +10209 3 +10959 4 10 +10656 3 +67012 1 10 +07065 8 +10161 4 7 +10679 3 2 +06092 3 +89044 3 5 +10363 3 9 +30974 7 10 +30840 3 8 +79106 3 10 +30703 10 +60965 4 10 +30928 4 10 +50298 3 +40475 3 5 +40233 3 +10579 3 +10180 3 7 +60910 3 10 +67252 7 +89018 4 +50967 3 9 +89037 3 +79135 3 6 +60883 4 10 +79140 3 10 +30752 3 10 +30907 3 7 +40579 3 10 +79049 2 10 +10134 9 +10332 8 +50313 3 +07076 3 +79129 4 5 +30632 3 7 +30892 3 9 +30805 3 10 +10627 3 8 +10212 3 7 +65160 3 7 +88086 3 +40424 3 10 +88068 1 8 +07003 2 +10727 3 8 +40195 3 10 +50341 3 6 +60517 6 4 +10158 10 +10554 9 +79076 5 +50320 5 10 +79178 3 6 +40853 4 10 +40585 3 9 +40462 3 9 +60972 3 10 +07030 3 6 +10614 1 +10707 3 9 +30868 3 10 +40409 3 2 +30954 3 10 +10093 3 +30921 3 9 +10570 3 10 +60537 3 8 +88030 3 +10116 1 10 +10189 9 +50291 9 +07106 3 +89030 3 8 +30755 3 8 +30900 3 8 +79132 3 4 +40914 2 6 +79147 1 10 +10133 6 +06048 5 +07068 3 +10204 3 +30963 3 8 +79061 3 5 +30839 3 8 +69002 3 10 +88007 3 +88072 4 10 +10547 7 +50221 3 7 +79112 3 10 +30771 3 6 +79008 3 9 +65117 2 9 +30825 10 +50329 3 10 +10105 3 10 +10567 3 9 +10736 3 +60506 3 8 +79171 1 10 +10682 7 +40221 4 +50289 7 7 +50182 3 +89009 3 9 +30939 4 10 +30746 3 8 +30812 3 8 +30733 6 3 +79150 1 10 +10191 10 +50216 8 +06109 5 +10124 3 +50305 3 9 +30909 3 +40872 4 6 +60544 3 8 +89039 1 +07015 3 +30642 2 8 +79047 8 +10389 9 +88058 8 +10306 3 +40435 4 10 +30968 3 +79084 4 10 +30788 3 10 +60925 3 8 +07089 3 +65104 3 6 +88079 3 3 +07063 9 +50236 2 +50350 3 +10699 3 10 +07040 4 10 +10974 3 7 +79108 3 9 +40593 4 10 +79016 3 9 +30604 4 10 +10013 3 +60942 3 9 +10677 6 +30878 3 10 +40482 3 8 +10102 3 10 +10685 3 +30719 3 10 +10560 3 2 +10177 3 10 +60242 3 +10594 3 8 +40418 3 9 +79159 3 10 +30655 3 10 +30930 3 10 +79036 3 10 +60908 4 10 +60522 3 6 +07024 3 +60496 9 +10198 9 +89021 3 +79127 3 6 +10629 3 10 +88088 4 10 +10144 8 +10552 3 3 +07057 3 10 +88012 3 9 +40449 3 9 +10646 2 6 +50443 3 10 +10678 3 8 +89045 3 +30975 3 +79107 4 9 +30702 3 9 +30841 3 8 +10160 3 8 +30795 3 9 +50704 10 +06093 5 +60966 3 9 +10183 4 4 +10604 3 6 +40403 3 6 +30862 3 10 +79160 3 8 +79029 3 +60913 3 6 +10099 10 +10333 4 10 +89036 3 8 +79134 3 10 +30906 3 9 +79048 3 7 +77046 3 6 +10135 3 +07100 7 +07071 3 +89028 3 10 +10620 3 +40892 7 3 +30918 3 8 +60876 3 10 +30895 4 10 +60933 3 6 +65167 3 7 +88081 3 3 +30635 10 +10215 10 +06050 3 +10726 3 10 +07050 3 +10555 3 10 +10641 2 +50340 4 10 +79118 4 9 +50323 5 10 +06012 3 5 +30949 3 7 +10583 7 4 +40461 4 10 +40586 3 8 +30660 3 9 +10617 3 10 +60971 3 9 +07033 3 +10688 10 +30714 10 +10117 3 7 +30920 4 10 +60987 3 10 +30869 3 8 +40408 3 3 +30955 3 9 +79022 3 10 +10092 3 10 +50303 4 6 +07013 2 8 +40874 7 8 +79148 1 7 +40571 4 +10546 3 5 +79060 4 10 +79187 3 7 +30962 3 9 +30885 3 9 +69003 3 6 +07083 10 +10205 6 +50222 6 10 +07059 3 6 +10648 3 2 +79094 3 8 +30772 3 +30853 3 8 +10150 3 8 +10805 3 6 +30942 3 10 +79170 3 9 +10683 4 10 +10171 3 +50328 3 9 +10104 2 9 +10566 1 10 +10588 10 +10123 2 10 +30741 3 10 +30734 4 10 +30815 3 10 +10196 2 7 +50211 1 9 +40416 10 +50304 4 10 +30908 3 9 +79046 4 10 +60545 3 9 +65151 3 10 +07014 1 10 +89038 10 +50235 3 6 +07060 3 +10305 3 +40559 3 +30831 3 10 +30765 3 3 +65172 3 +79087 6 +88090 3 +07041 3 4 +40592 3 7 +30605 3 10 +67278 3 9 +60943 3 7 +10698 3 6 +10975 3 6 +10012 10 diff --git a/report/benchmarks/bus-analytics/setup/config.json b/report/benchmarks/bus-analytics/setup/config.json new file mode 100644 index 00000000..56a2804c --- /dev/null +++ b/report/benchmarks/bus-analytics/setup/config.json @@ -0,0 +1,38 @@ +[ + { + "name": "Bus 1.sh", + "env": ["INPUT_FILE={{RESOURCE_DIR}}/bus.csv"], + "command": "{{TEST_SCRIPT_DIR}}/1.sh", + "orch_args": "-d 2" + }, + { + "name": "Bus 2.sh", + "env": ["INPUT_FILE={{RESOURCE_DIR}}/bus.csv"], + "command": "{{TEST_SCRIPT_DIR}}/2.sh", + "orch_args": "-d 2" + }, + { + "name": "Bus 3.sh", + "env": ["INPUT_FILE={{RESOURCE_DIR}}/bus.csv"], + "command": "{{TEST_SCRIPT_DIR}}/3.sh", + "orch_args": "-d 2" + }, + { + "name": "Bus 4.sh", + "env": ["INPUT_FILE={{RESOURCE_DIR}}/bus.csv"], + "command": "{{TEST_SCRIPT_DIR}}/4.sh", + "orch_args": "-d 2" + }, + { + "name": "Bus 5.sh", + "env": ["INPUT_FILE={{RESOURCE_DIR}}/bus.csv"], + "command": "{{TEST_SCRIPT_DIR}}/5.sh", + "orch_args": "-d 2" + }, + { + "name": "Bus full", + "env": ["INPUT_FILE={{RESOURCE_DIR}}/bus.csv"], + "command": "{{TEST_SCRIPT_DIR}}/full.sh", + "orch_args": "-d 2" + } +] \ No newline at end of file diff --git a/report/benchmarks/bus-analytics/setup/setup.sh b/report/benchmarks/bus-analytics/setup/setup.sh new file mode 100755 index 00000000..e36657e5 --- /dev/null +++ b/report/benchmarks/bus-analytics/setup/setup.sh @@ -0,0 +1,10 @@ +if [ ! -f bus.csv ]; then + echo "Downloading full-size dataset..." + wget -nc -O bus.csv.bz2 'https://www.balab.aueb.gr/~dds/oasa-2021-01-08.bz2' + if [[ -f bus.csv.bz2 ]]; then + echo "Decompressing full-size dataset..." + bzip2 -d bus.csv.bz2 + fi +else + echo "Full-size dataset already exists." +fi diff --git a/report/result_analyzer.py b/report/result_analyzer.py index e0a7d1df..a5883e27 100644 --- a/report/result_analyzer.py +++ b/report/result_analyzer.py @@ -1,8 +1,5 @@ from datetime import datetime -import matplotlib.pyplot as plt -import matplotlib.dates as mdates import hashlib -import numpy as np class ResultAnalyzer: @staticmethod @@ -11,22 +8,33 @@ def process_results(orch_log): prog_blocks = [] current_block = [] block_start_time = None - + next_line = False + for line in log_lines: - if line.startswith("INFO|") and "[PROG_LOG]" in line: + if next_line and "---" in line: + node_id = line.split("---")[1].strip().strip("@") + current_block.append((node_id.strip(), state.strip())) + next_line = False + elif line.startswith("INFO|") and \ + "[PROG_LOG]" in line and \ + "] canon:" not in line and \ + "] spec:" not in line: parts = line.split("|") time_str = parts[1] - log_content = parts[2].strip() + log_content = " ".join(parts[2:]).strip() if log_content == "[PROG_LOG]": # Start of a new block if current_block: prog_blocks.append((block_start_time, current_block)) current_block = [] block_start_time = datetime.strptime(time_str, "%Y-%m-%d %H:%M:%S,%f") - else: - # Continuing the current block - state, node_id, command = log_content.replace("[PROG_LOG] ", "").split(",", 2) + elif "---" in line: + state = log_content.replace("[PROG_LOG] ", "").strip().split()[0] + node_id = log_content.split("---")[1].strip().strip("@") current_block.append((node_id.strip(), state.strip())) + else: + state = log_content.replace("[PROG_LOG] ", "").strip().split()[0] + next_line = True # Append the last block if not empty if current_block: prog_blocks.append((block_start_time, current_block))