diff options
-rw-r--r-- | FUELCRED | 32 | ||||
-rw-r--r-- | benchmarks/foo | 0 | ||||
-rw-r--r-- | benchmarks/playbooks/cachebench.yaml | 38 | ||||
-rw-r--r-- | benchmarks/playbooks/dhrystone.yaml | 88 | ||||
-rw-r--r-- | benchmarks/playbooks/dpi.yaml | 85 | ||||
-rw-r--r-- | benchmarks/playbooks/info_script/info_collect.py | 106 | ||||
-rw-r--r-- | benchmarks/playbooks/ramspeedbench.yaml | 38 | ||||
-rw-r--r-- | benchmarks/playbooks/result_transform/dpi/dpi_average.sh | 14 | ||||
-rw-r--r-- | benchmarks/playbooks/result_transform/dpi/dpi_transform.py | 50 | ||||
-rw-r--r-- | benchmarks/playbooks/result_transform/final_report.py | 23 | ||||
-rw-r--r-- | benchmarks/playbooks/result_transform/ssl/ssl_transform.py | 67 | ||||
-rw-r--r-- | benchmarks/playbooks/result_transform/ubench_transform.py | 35 | ||||
-rw-r--r-- | benchmarks/playbooks/ssl.yaml | 82 | ||||
-rw-r--r-- | benchmarks/playbooks/sys_info_pbook.yaml | 15 | ||||
-rw-r--r-- | benchmarks/playbooks/whetstone.yaml | 79 | ||||
-rw-r--r-- | foremancred | 5 |
16 files changed, 720 insertions, 37 deletions
diff --git a/FUELCRED b/FUELCRED deleted file mode 100644 index d2cebb0c..00000000 --- a/FUELCRED +++ /dev/null @@ -1,32 +0,0 @@ - -#!/bin/bash - -# To use an Openstack cloud you need to authenticate against keystone, which -# returns a **Token** and **Service Catalog**. The catalog contains the -# endpoint for all services the user/tenant has access to - including nova, -# glance, keystone, swift. -# -# *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0. We -# will use the 1.1 *compute api* -export OS_AUTH_URL=http://172.18.0.69:5000/v2.0 - -# With the addition of Keystone we have standardized on the term **tenant** -# as the entity that owns the resources. -export OS_TENANT_ID=48ea2b0008dd459b8713fe6977836318 -export OS_TENANT_NAME="admin" - -# In addition to the owning entity (tenant), openstack stores the entity -# performing the action as the **user**. -export OS_USERNAME="admin" - -# With Keystone you pass the keystone password. -echo "Please enter your OpenStack Password: " -read -sr OS_PASSWORD_INPUT -export OS_PASSWORD=$OS_PASSWORD_INPUT - -# If your configuration has multiple regions, we set that information here. -# OS_REGION_NAME is optional and only valid in certain environments. -export OS_REGION_NAME="RegionOne" -# Don't leave a blank variable, unset it if it was empty -if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi - diff --git a/benchmarks/foo b/benchmarks/foo deleted file mode 100644 index e69de29b..00000000 --- a/benchmarks/foo +++ /dev/null diff --git a/benchmarks/playbooks/cachebench.yaml b/benchmarks/playbooks/cachebench.yaml new file mode 100644 index 00000000..4569d4af --- /dev/null +++ b/benchmarks/playbooks/cachebench.yaml @@ -0,0 +1,38 @@ + + - hosts: "{{ roles }}" + + tasks: + - name: clean + shell: rm -rf /usr/bin/phoronix-test-suite + shell: rm -rf /usr/share/doc/phoronix-test-suite/ + shell: rm -rf /usr/share/phoronix-test-suite + shell: rm -rf /root/photmp/ + - name: cleaning results + file: path=/root/results state=absent + - name: make direc + file: path=/root/photmp/ state=directory + - name: Fetch Phornonix + shell: cd /root/photmp/ && wget https://www.dropbox.com/s/5kks513ozxy7vvs/phoronix-suite.tar.gz + - name: unarchive Phoronix + shell: cd /root/photmp/ && tar -zxvf phoronix-suite.tar.gz + - name: Install Phornonix Dependencies + shell: yum install php php-xml php-client php-process -y + - name: Install Phornonix + shell: cd /root/photmp/phoronix-test-suite-master/&&./install-sh + - name: batchSetup + shell: phoronix-test-suite batch-setup + - name: install + shell: phoronix-test-suite batch-install cachebench + - name: run + shell: phoronix-test-suite batch-run cachebench + - name: making directory + file: path=/root/results state=directory + - name: copying result to temp directory + shell: cp -r /var/lib/phoronix-test-suite/test-results/* /root/results/ + - name: registering files + shell: (cd /root/results/; find . -maxdepth 1 -type f) | cut -d'/' -f2 + register: files_to_copy + - name: copy results + fetch: src=/root/results/{{item}} dest={{Dest_dir}}/cachebench + with_items: files_to_copy.stdout_lines + diff --git a/benchmarks/playbooks/dhrystone.yaml b/benchmarks/playbooks/dhrystone.yaml new file mode 100644 index 00000000..23d67f6f --- /dev/null +++ b/benchmarks/playbooks/dhrystone.yaml @@ -0,0 +1,88 @@ + - hosts: 127.0.0.1 + connection: local + tasks: + - name: making dhrystone directory + file: path={{Dest_dir}}/dhrystone/dhrystone_temp state=directory + - name: making temporary dhrystone directory + file: path={{Dest_dir}}/dhrystone/dhrystone_temp state=directory + + - hosts: "{{role}}" + + tasks: + - name: checking_home directory + shell: echo $HOME + register: home_dir + - name: cleaning tempT + shell: rm -rf $HOME/tempT + - name: cleaning_qtip_result + shell: rm -rf $HOME/qtip_result + - name: make directory + shell: mkdir $HOME/qtip_result + - include: ./sys_info_pbook.yaml + - name: Installing UnixBench dependencies if CentOS + shell: yum install git gcc patch perl-Time-HiRes -y + when: ansible_os_family == "RedHat" + - name: Installing UnixBench dependencies if Ubuntu + shell: apt-get install git gcc patch perl -y + when: ansible_os_family == "Debian" + - name: Clone unixbench + shell: git clone https://github.com/kdlucas/byte-unixbench.git $HOME/tempT + - name: make + shell: make --directory $HOME/tempT/UnixBench/ + - name: downloading_patch + shell: cd $HOME/tempT/UnixBench/ && wget https://www.dropbox.com/s/11z85gfu0trkhus/fix-limitation.patch + - name: applying_patch + shell: cd $HOME/tempT/UnixBench/ && patch Run fix-limitation.patch + - name: Run dhrystone + shell: cd $HOME/tempT/UnixBench/&&./Run -v dhrystone + - name: collecting and transforming result script copy + copy: src=./result_transform/ubench_transform.py dest={{home_dir.stdout}}/qtip_result/ + - name: transforming result + shell: cd $HOME/qtip_result/ && python ubench_transform.py + - name: copying consolidated report script + copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result/ + - name: making consolidated report + shell: cd $HOME/qtip_result && python final_report.py Dhrystone + - name: making directory + file: path={{home_dir.stdout}}/qtip_result/log state=directory + - name: copying result to temp directory + shell: cp -r $HOME/tempT/UnixBench/results/* $HOME/qtip_result/log/ + - name: registering files + shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2 + register: files_to_copy + - name: copy results + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/dhrystone/dhrystone_temp + with_items: files_to_copy.stdout_lines + - name: registering log files + shell: (cd $HOME/qtip_result/log/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2 + register: copy_log_results + - name: copying log results + fetch: src={{home_dir.stdout}}/qtip_result/log/{{item}} dest={{Dest_dir}}/dhrystone/dhrystone_temp + with_items: copy_log_results.stdout_lines + + - name: cleaning tempT + shell: rm -rf $HOME/tempT + - name: cleaning_qtip_result + shell: rm -rf $HOME/qtip_result + + + - hosts: 127.0.0.1 + connection: local + tasks: + - name: extracting_json + shell: ( find {{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/dhrystone/) + - name: making_logs_folder + shell: mkdir -p {{Dest_dir}}/dhrystone/logs + - name: extracting_log + shell: ( find {{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/dhrystone/logs) + - name: removing dhrystone_temp + shell: rm -rf {{Dest_dir}}/dhrystone/dhrystone_temp + + + + + + # - name: cleaning_2 + # file: path=/root/tempT state=absent + # file: path=/root/qtip_result state=absent + diff --git a/benchmarks/playbooks/dpi.yaml b/benchmarks/playbooks/dpi.yaml new file mode 100644 index 00000000..e96edc85 --- /dev/null +++ b/benchmarks/playbooks/dpi.yaml @@ -0,0 +1,85 @@ + - hosts: 127.0.0.1 + connection: local + tasks: + - name: making dpi directory + file: path={{Dest_dir}}/dpi state=directory + - name: making temporary whetstone directory + file: path={{Dest_dir}}/dpi/dpi_temp state=directory + + - hosts: "{{role}}" + tasks: + + - name: checking_home directory + shell: echo $HOME + register: home_dir + - name: cleaning + shell: rm -rf $HOME/tempD + - name: cleaning previous results + shell: rm -rf $HOME/qtip_result + - name: make qtip_result + shell: mkdir $HOME/qtip_result + - include: ./sys_info_pbook.yaml + - name: Installing nDPI dependencies if CentOS + shell: yum install git gcc patch perl-Time-HiRes autofconf automake libpcap-devel libtool -y + when: ansible_os_family == "RedHat" + - name: Installing nDPI dependcies if Ubuntu + shell: apt-get install git gcc patch autoconf automake libpcap-dev libtool -y + when: ansible_os_family == "Debian" + - name: making nDPI temporary directory + shell: mkdir $HOME/tempD + - name: Clone nDPI + shell: cd $HOME/tempD && git clone https://github.com/ntop/nDPI.git + - name: autogen + shell: cd $HOME/tempD/nDPI && ./autogen.sh + - name: configure + shell: cd $HOME/tempD/nDPI && ./configure + - name: make + shell: cd $HOME/tempD/nDPI && make + - name: Fetching Test_pcap file + shell: cd $HOME/tempD/nDPI/example && wget https://www.dropbox.com/s/ne64u7jykuw2uu5/test.pcap + - name: fetch Averaging script + copy: src=./result_transform/dpi/dpi_average.sh dest={{home_dir.stdout}}/tempD/nDPI/example mode=777 + - name: Run nDPI benchmark + shell: cd $HOME/tempD/nDPI/example && ./dpi_average.sh + - name: copy result to temp_direc + shell: cp $HOME/tempD/nDPI/example/dpi_dump.txt $HOME/qtip_result + - name: fetch dpi result transform script + copy: src=./result_transform/dpi/dpi_transform.py dest={{home_dir.stdout}}/qtip_result + + - name: Transforming results + shell: cd $HOME/qtip_result && python dpi_transform.py + - name: copy report formation script + copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result + - name: consolidating report + shell: cd $HOME/qtip_result && python final_report.py DPI + - name: registering files + shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2 + register: files_to_copy + - name: copy results + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/dpi/dpi_temp + with_items: files_to_copy.stdout_lines + - name: registering log files + shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2 + register: copy_log_results + - name: copying log results + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/dpi/dpi_temp + with_items: copy_log_results.stdout_lines + + # - name: cleaning tempD + # shell: rm -rf $HOME/tempD + # - name: cleaning_qtip_result + # shell: rm -rf $HOME/qtip_result + + + - hosts: 127.0.0.1 + connection: local + tasks: + - name: extracting_json + shell: ( find {{Dest_dir}}/dpi/dpi_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/dpi/) + - name: making_logs_folder + shell: mkdir -p {{Dest_dir}}/dpi/logs + - name: extracting_log + shell: ( find {{Dest_dir}}/dpi/dpi_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/dpi/logs) + - name: removing dpi_temp + shell: rm -rf {{Dest_dir}}/dpi/dpi_temp + diff --git a/benchmarks/playbooks/info_script/info_collect.py b/benchmarks/playbooks/info_script/info_collect.py new file mode 100644 index 00000000..192cec3f --- /dev/null +++ b/benchmarks/playbooks/info_script/info_collect.py @@ -0,0 +1,106 @@ +import os +import pickle +import time +import datetime +import json + +os.system('inxi -b -c0 -n > $PWD/est_2') +est_ob = open("est_2", "r+") +est_ob2 = open("est_1", "w+") +in_string = est_ob.read().replace('\n', ' ') + +est_ob2.write(in_string) +est_ob.close() +est_ob2.close() + +Info_dict = {} +inxi_host = os.popen( + """cat $PWD/est_1 | grep -o -P '(?<=Host:).*(?=Kernel)' """).read().lstrip().rstrip() +inxi_mem = os.popen( + """inxi -c0 | grep -o -P '(?<=Mem~).*(?=HDD)' """).read().lstrip().rstrip() +inxi_cpu = os.popen( + """cat $PWD/est_1 | grep -o -P '(?<=CPU).*(?=speed)' | cut -f2 -d':'""").read().lstrip().rstrip() + +inxi_distro = os.popen( + """ cat $PWD/est_1 | grep -o -P '(?<=Distro:).*(?=Machine:)' """).read().rstrip().lstrip() +inxi_kernel = os.popen( + """ cat $PWD/est_1 | grep -o -P '(?<=Kernel:).*(?=Console:)' """).read().rstrip().lstrip() +inxi_HD = os.popen( + """ cat $PWD/est_1 | grep -o -P '(?<=HDD Total Size:).*(?=Info:)' """).read().rstrip().lstrip() + +inxi_product = os.popen( + """ cat $PWD/est_1 | grep -o -P '(?<=product:).*(?=Mobo:)' """).read().rstrip().lstrip() + + + +Info_dict['1_Hostname'] = inxi_host +Info_dict['2_Product'] = inxi_product +Info_dict['3_OS Distribution'] = inxi_distro +Info_dict['4_Kernel'] = inxi_kernel +Info_dict['5_CPU'] = inxi_cpu +Info_dict['6_Memory Usage'] = inxi_mem +Info_dict['7_Disk usage'] = inxi_HD +Info_dict['8_Network_Interfaces'] = {} + +tem_2 = """ cat $PWD/est_1 | grep -o -P '(?<=Network:).*(?=Info:)'""" +print os.system(tem_2 + ' > Hello') +i = int(os.popen(tem_2 + " | grep -o 'Card' | wc -l ").read()) +print i + + +for x in range(1, i + 1): + tem = """ cat $PWD/est_1 | grep -o -P '(?<=Card-""" + str( + x) + """:).*(?=Card-""" + str(x + 1) + """)'""" + if i == 1: + tem = """ cat $PWD/est_1 | grep -o -P '(?<=Network:).*(?=Info:)'""" + inxi_card_1 = ( + (os.popen( + tem + + " | grep -o -P '(?<=Card:).*(?=Drives:)'|sed 's/ *driver:.*//'").read().rstrip().lstrip())) + print inxi_card_1 + Info_dict['8_Network_Interfaces']['Interface_' + str(x)] = {} + Info_dict['8_Network_Interfaces'][ + 'Interface_' + str(x)]['1_Network_Card'] = inxi_card_1 + inxi_card_2 = ( + (os.popen( + tem + + "| grep -o -P '(?<=Card:).*(?=Drives:)'|sed -e 's/^.*IF: //'").read())).rstrip().lstrip() + Info_dict['8_Network_Interfaces'][ + 'Interface_' + str(x)]['2_Interface_info'] = inxi_card_2 + elif x < (i): + print "two" + #inxi_Card_temp=((os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Card-"""+str(x)+""":).*(?=Card-"""+str(x+1)+""")' """).read().rstrip().lstrip())) + inxi_card_1 = ( + (os.popen(tem + "| sed 's/ *driver:.*//'").read().rstrip().lstrip())) + Info_dict['8_Network_Interfaces']['Interface_' + str(x)] = {} + Info_dict['8_Network_Interfaces'][ + 'Interface_' + str(x)]['1_Network_Card'] = inxi_card_1 + inxi_card_2 = ( + (os.popen(tem + "|sed -e 's/^.*IF: //'").read())).rstrip().lstrip() + Info_dict['8_Network_Interfaces'][ + 'Interface_' + str(x)]['2_Interface_info'] = inxi_card_2 + elif x == i: + print "Three" + Info_dict['8_Network_Interfaces']['Interface_' + str(x)] = {} + inxi_card_1 = ( + (os.popen( + """ cat $PWD/est_1 | grep -o -P '(?<=Card-""" + + str(x) + + """:).*(?=Drives:)'| sed 's/ *driver:.*//' """).read().rstrip().lstrip())) + Info_dict['8_Network_Interfaces'][ + 'Interface_' + str(x)]['1_Network_Card'] = inxi_card_1 + inxi_card_2 = ( + (os.popen( + """ cat $PWD/est_1 | grep -o -P '(?<=Card-""" + + str(x) + + """:).*(?=Drives:)'| sed -e 's/^.*IF: //' """).read().rstrip().lstrip())) + Info_dict['8_Network_Interfaces'][ + 'Interface_' + str(x)]['2_Interface_info'] = inxi_card_2 + else: + print "No network cards" + +home_dir = str(os.popen("echo $HOME").read().rstrip()) +with open('./sys_info_temp', 'w+')as out_info: + pickle.dump(Info_dict, out_info) + + diff --git a/benchmarks/playbooks/ramspeedbench.yaml b/benchmarks/playbooks/ramspeedbench.yaml new file mode 100644 index 00000000..d8136b08 --- /dev/null +++ b/benchmarks/playbooks/ramspeedbench.yaml @@ -0,0 +1,38 @@ + + - hosts: "{{ role }}" + + tasks: + - name: clean + shell: rm -rf /usr/bin/phoronix-test-suite + shell: rm -rf /usr/share/doc/phoronix-test-suite/ + shell: rm -rf /usr/share/phoronix-test-suite + shell: rm -rf /root/photmp/ + - name: clean previous results + file: path=/root/results path=absent + - name: make direc + file: path=/root/photmp/ state=directory + - name: Fetch Phornonix + shell: cd /root/photmp/ && wget https://www.dropbox.com/s/5kks513ozxy7vvs/phoronix-suite.tar.gz + - name: unarchive Phoronix + shell: cd /root/photmp/ && tar -zxvf phoronix-suite.tar.gz + - name: Phornonix Dependencies + shell: yum install php php-xml php-client php-process -y + - name: Install Phornonix + shell: cd /root/photmp/phoronix-test-suite-master/&&./install-sh + - name: batchSetup + shell: phoronix-test-suite batch-setup + - name: install + shell: phoronix-test-suite batch-install ramspeed + - name: run + shell: phoronix-test-suite batch-run ramspeed + - name: making directory + file: path=/root/results state=directory + - name: copying result to temp directory + shell: cp -r /var/lib/phoronix-test-suite/test-results/* /root/results/ + - name: registering files + shell: (cd /root/results/; find . -maxdepth 1 -type f) | cut -d'/' -f2 + register: files_to_copy + - name: copy results + fetch: src=/root/results/{{item}} dest={{Dest_dir}}/dhrystone + with_items: files_to_copy.stdout_lines + diff --git a/benchmarks/playbooks/result_transform/dpi/dpi_average.sh b/benchmarks/playbooks/result_transform/dpi/dpi_average.sh new file mode 100644 index 00000000..405d3ff6 --- /dev/null +++ b/benchmarks/playbooks/result_transform/dpi/dpi_average.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +COUNTER=0 +WDIR=$PWD +while [ $COUNTER -lt 10 ]; do + + echo $WDIR + $( ./ndpiReader -i test.pcap >> $WDIR/dpi_dump.txt ) + let COUNTER=COUNTER+1 + echo "Run number: $COUNTER" + +done + + diff --git a/benchmarks/playbooks/result_transform/dpi/dpi_transform.py b/benchmarks/playbooks/result_transform/dpi/dpi_transform.py new file mode 100644 index 00000000..89e4f187 --- /dev/null +++ b/benchmarks/playbooks/result_transform/dpi/dpi_transform.py @@ -0,0 +1,50 @@ +import os +import json +import pickle +import datetime + +sum_dpi_pps = float(0) +sum_dpi_bps = float(0) + +for x in range(1, 11): + dpi_result_pps = float( + os.popen( + "cat $HOME/qtip_result/dpi_dump.txt | grep 'nDPI throughput:' | awk 'NR=='" + + str(x) + + " | awk '{print $3}'").read().lstrip()) + dpi_result_bps = float( + os.popen( + "cat $HOME/qtip_result/dpi_dump.txt | grep 'nDPI throughput:' | awk 'NR=='" + + str(x) + + " | awk '{print $7}'").read().rstrip()) + + if (dpi_result_pps > 100): + dpi_result_pps = dpi_result_pps / 1000 + + if (dpi_result_bps > 100): + dpi_result_bps = dpi_result_bps / 1000 + + sum_dpi_pps += dpi_result_pps + sum_dpi_bps += dpi_result_bps + +dpi_result_pps = sum_dpi_pps / 10 +dpi_result_bps = sum_dpi_bps / 10 + +host = os.popen("hostname").read().rstrip() +log_time_stamp = str(datetime.datetime.utcnow().isoformat()) + +os.popen( + "cat $HOME/qtip_result/dpi_dump.txt > $HOME/qtip_result/" + + host + + "-" + + log_time_stamp + + ".log") + +home_dir = str(os.popen("echo $HOME").read().rstrip()) +host = os.popen("echo $HOSTNAME") +result = {} +result['DPI_benchmark(M pps)'] = round(dpi_result_pps, 3) +result['DPI_benchmark(Gb/s)'] = round(dpi_result_bps, 3) +with open('./result_temp', 'w+') as result_file: + pickle.dump(result, result_file) + diff --git a/benchmarks/playbooks/result_transform/final_report.py b/benchmarks/playbooks/result_transform/final_report.py new file mode 100644 index 00000000..576109bf --- /dev/null +++ b/benchmarks/playbooks/result_transform/final_report.py @@ -0,0 +1,23 @@ +import pickle +import json +import datetime +import os +import sys + +home_dir = str((os.popen("echo $HOME").read().rstrip())) + +with open('./sys_info_temp', 'r') as sys_info_f: + sys_info_dict = pickle.load(sys_info_f) +with open('./result_temp', 'r') as result_f: + result_dict = pickle.load(result_f) + +host_name = (os.popen("hostname").read().rstrip()) +benchmark_name = str(sys.argv[1]) +report_time_stamp = str(datetime.datetime.utcnow().isoformat()) +final_dict = {} +final_dict['1 Time of Report'] = report_time_stamp +final_dict['2 System Information'] = sys_info_dict +final_dict['3 ' + benchmark_name + ' result'] = result_dict + +with open('./' + host_name + '-' + report_time_stamp + '.json', 'w+') as result_json: + json.dump(final_dict, result_json, indent=4, sort_keys=True) diff --git a/benchmarks/playbooks/result_transform/ssl/ssl_transform.py b/benchmarks/playbooks/result_transform/ssl/ssl_transform.py new file mode 100644 index 00000000..188eb3d5 --- /dev/null +++ b/benchmarks/playbooks/result_transform/ssl/ssl_transform.py @@ -0,0 +1,67 @@ +import os +import json +import pickle +import datetime + +#total_cpu=os.popen("cat $HOME/tempD/nDPI/example/result.txt | tail -1").read() + +openssl_version = os.popen("cat RSA_dump | head -1").read().rstrip() +rsa_512_sps = os.popen( + "cat RSA_dump | grep '512 bits ' | awk '{print $6}' ").read().rstrip() +rsa_512_vps = os.popen( + "cat RSA_dump | grep '512 bits ' | awk '{print $7}' ").read().rstrip() +rsa_1024_sps = os.popen( + "cat RSA_dump | grep '1024 bits ' | awk '{print $6}' ").read().rstrip() +rsa_1024_vps = os.popen( + "cat RSA_dump | grep '1024 bits ' | awk '{print $7}' ").read().rstrip() +rsa_2048_sps = os.popen( + "cat RSA_dump | grep '2048 bits ' | awk '{print $6}' ").read().rstrip() +rsa_2048_vps = os.popen( + "cat RSA_dump | grep '2048 bits ' | awk '{print $7}' ").read().rstrip() +rsa_4096_sps = os.popen( + "cat RSA_dump | grep '4096 bits ' | awk '{print $6}' ").read().rstrip() +rsa_4096_vps = os.popen( + "cat RSA_dump | grep '4096 bits ' | awk '{print $7}' ").read().rstrip() + + +aes_16B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $2}' ").read().rstrip() +aes_64B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $3}' ").read().rstrip() +aes_256B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $4}' ").read().rstrip() +aes_1024B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $5}' ").read().rstrip() +aes_8192B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $6}' ").read().rstrip() + + +hostname = os.popen("hostname").read().rstrip() +time_stamp = str(datetime.datetime.utcnow().isoformat()) + + +os.system("mv RSA_dump " + hostname + "-" + time_stamp + ".log") +os.system("cat AES-128-CBC_dump >> " + hostname + "-" + time_stamp + ".log") + + +result = {} + +result['1. Version'] = [openssl_version] +result['2. RSA singatures'] = {} +result['2. RSA singatures']['1. 512 bits (sign/s)'] = [rsa_512_sps] +result['2. RSA singatures']['2. 1024 bits (sign/s)'] = [rsa_1024_sps] +result['2. RSA singatures']['3. 2048 bits (sign/s)'] = [rsa_2048_sps] +result['2. RSA singatures']['4. 4096 bits (sign/s)'] = [rsa_4096_sps] + +result['3. AES-128-cbc throughput'] = {} +result['3. AES-128-cbc throughput']['1. 16 Bytes block (B/sec)'] = [aes_16B] +result['3. AES-128-cbc throughput']['2. 64 Bytes block (B/sec)'] = [aes_64B] +result['3. AES-128-cbc throughput']['3. 256 Bytes block (B/sec)'] = [aes_256B] +result['3. AES-128-cbc throughput']['4. 1024 Bytes block (B/sec)'] = [aes_1024B] +result['3. AES-128-cbc throughput']['5. 16 Bytes block (B/sec)'] = [aes_8192B] + + +with open('./result_temp', 'w+') as result_file: + pickle.dump(result, result_file) + + diff --git a/benchmarks/playbooks/result_transform/ubench_transform.py b/benchmarks/playbooks/result_transform/ubench_transform.py new file mode 100644 index 00000000..f15943d7 --- /dev/null +++ b/benchmarks/playbooks/result_transform/ubench_transform.py @@ -0,0 +1,35 @@ +import os +import json +import pickle +import datetime + +total_cpu = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $1;}' | awk 'NR==1'").read().rstrip() + +cpu_1 = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $6;}' | awk 'NR==1'").read().rstrip() + + +cpu_2 = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $6;}' | awk 'NR==2'").read().rstrip() + + +Index_1 = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'Index Score (Partial Only) ' | awk '{print $7;}' | awk 'NR==1'").read().rstrip() +Index_2 = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'Index Score (Partial Only) ' | awk '{print $7;}' | awk 'NR==2'").read().rstrip() + + +result = {} +result['1.Number of CPU(s) in system'] = total_cpu +result['2.Single CPU test'] = {} +result['2.Single CPU test']['1.Number of parallell test(s)'] = cpu_1 +result['2.Single CPU test']['2.Index score'] = Index_1 +result['3.Multi CPU test'] = {} +result['3.Multi CPU test']['1.Number of parallell test(s)'] = cpu_2 +result['3.Multi CPU test']['2.Index score'] = Index_2 + +with open('result_temp', 'w+') as result_file: + pickle.dump(result, result_file) +print json.dumps(result, indent=4, sort_keys=True) +# print result.items() diff --git a/benchmarks/playbooks/ssl.yaml b/benchmarks/playbooks/ssl.yaml new file mode 100644 index 00000000..a451e26b --- /dev/null +++ b/benchmarks/playbooks/ssl.yaml @@ -0,0 +1,82 @@ + - hosts: 127.0.0.1 + connection: local + tasks: + - name: making ssl directory + file: path={{Dest_dir}}/ssl state=directory + - name: making temporary ssl directory + file: path={{Dest_dir}}/ssl/ssl_temp state=directory + + + - hosts: "{{role}}" + tasks: + + - name: checking_home directory + shell: echo $HOME + register: home_dir + - name: cleaning + shell: rm -rf $HOME/Open_SSL + - name: cleaning previous results + shell: rm -rf $HOME/qtip_result + - name: making OpenSSL temporary directory + shell: mkdir $HOME/Open_SSL + - name: making results temporary directory + shell: mkdir $HOME/qtip_result + - include: ./sys_info_pbook.yaml + - name: Installing OpenSSL dependencies when CentOS + shell: yum install git wget gcc patch perl-Time-HiRes autofconf automake libpcap-devel libtool -y + when: ansible_os_family == "RedHat" + - name: Installing OpenSSL dependencies when Ubuntu + shell: apt-get install git gcc wget perl autoconf automake libpcap-dev libtool -y + when: ansible_os_family == "Debian" + - name: Fetching OpenSSL + shell: cd $HOME/Open_SSL/ && wget https://www.openssl.org/source/openssl-1.0.2d.tar.gz + - name: Untar OpenSSL + shell: cd $HOME/Open_SSL/ && tar -zxvf openssl-1.0.2d.tar.gz + - name: configure + shell: cd $HOME/Open_SSL/openssl-1.0.2d && ./config + - name: make + shell: cd $HOME/Open_SSL/openssl-1.0.2d && make + - name: make install + shell: cd $HOME/Open_SSL/openssl-1.0.2d && make install + - name: Benchmarking RSA signatures + shell: cd $HOME/Open_SSL/openssl-1.0.2d/apps && ./openssl speed rsa >> $HOME/qtip_result/RSA_dump + - name: Benchmaring AES-128-cbc cipher encryption throughput + shell: cd $HOME/Open_SSL/openssl-1.0.2d/apps && ./openssl speed -evp aes-128-cbc >> $HOME/qtip_result/AES-128-CBC_dump + - name: Fetching result transformation script + copy: src=./result_transform/ssl/ssl_transform.py dest={{home_dir.stdout}}/qtip_result + - name: Transforming result + shell: cd $HOME/qtip_result && python ssl_transform.py + - name: copy report formation script + copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result + - name: consolidating report + shell: cd $HOME/qtip_result && python final_report.py SSL + - name: registering files + shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2 + register: files_to_copy + - name: copy results + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/ssl/ssl_temp + with_items: files_to_copy.stdout_lines + - name: registering log files + shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2 + register: copy_log_results + - name: copying log results + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/ssl/ssl_temp + with_items: copy_log_results.stdout_lines + + + # - name: copy results + # fetch: src=/root/results/{{item}} dest={{Dest_dir}}/ssl + # with_items: files_to_copy.stdout_lines + + - hosts: 127.0.0.1 + connection: local + tasks: + - name: extracting_json + shell: ( find {{Dest_dir}}/ssl/ssl_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/ssl/) + - name: making_logs_folder + shell: mkdir -p {{Dest_dir}}/ssl/logs + - name: extracting_log + shell: ( find {{Dest_dir}}/ssl/ssl_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/ssl/logs) + - name: removing ssl_temp + shell: rm -rf {{Dest_dir}}/ssl/ssl_temp + diff --git a/benchmarks/playbooks/sys_info_pbook.yaml b/benchmarks/playbooks/sys_info_pbook.yaml new file mode 100644 index 00000000..cef5e608 --- /dev/null +++ b/benchmarks/playbooks/sys_info_pbook.yaml @@ -0,0 +1,15 @@ + - name: Epel Release install when CentOS + shell: yum install epel-release -y + when: ansible_os_family == "RedHat" + - name: Inxi install when CentOS + shell: yum install inxi -y + when: ansible_os_family == "RedHat" + - name: system info collection tool install when Ubuntu + shell: apt-get install inxi -y + when: ansible_os_family == "Debian" + - name: system_info script copy + copy: src=./info_script/info_collect.py dest={{home_dir.stdout}}/qtip_result/ + - name: collecting_sys_info + shell: cd $HOME/qtip_result && python info_collect.py + + diff --git a/benchmarks/playbooks/whetstone.yaml b/benchmarks/playbooks/whetstone.yaml new file mode 100644 index 00000000..2e3159b8 --- /dev/null +++ b/benchmarks/playbooks/whetstone.yaml @@ -0,0 +1,79 @@ + - hosts: 127.0.0.1 + connection: local + tasks: + - name: making whetstone directory + file: path={{Dest_dir}}/whetstone state=directory + - name: making temporary whetstone directory + file: path={{Dest_dir}}/whetstone/whetstone_temp state=directory + + - hosts: "{{role}}" + + tasks: + + - name: storing_home + shell: echo $HOME + register: home_dir + - name: cleaning tempT + shell: rm -rf $HOME/tempT + - name: cleaning_qtip_result + shell: rm -rf $HOME/qtip_result + - name: make directory + shell: mkdir $HOME/qtip_result + - include: ./sys_info_pbook.yaml + - name: Installing UnixBench dependencies if CentOS + shell: yum install git gcc patch perl-Time-HiRes -y + when: ansible_os_family == "RedHat" + - name: Installing UnixBench dependencies if Ubuntu + shell: apt-get install git gcc patch perl -y + when: ansible_os_family == "Debian" + - name: Clone unixbench + shell: git clone https://github.com/kdlucas/byte-unixbench.git $HOME/tempT + - name: make + shell: make --directory $HOME/tempT/UnixBench/ + - name: downloading_patch + shell: cd $HOME/tempT/UnixBench/ && wget https://www.dropbox.com/s/11z85gfu0trkhus/fix-limitation.patch + - name: applying_patch + shell: cd $HOME/tempT/UnixBench/ && patch Run fix-limitation.patch + - name: Run Whetstone + shell: cd $HOME/tempT/UnixBench/&&./Run -v whetstone + - name: collecting and transforming result script copy + copy: src=./result_transform/ubench_transform.py dest={{home_dir.stdout}}/qtip_result/ + - name: transforming result + shell: cd $HOME/qtip_result && python ubench_transform.py + - name: copying consolidated report script + copy: src=./result_transform/final_report.py dest={{home_dir.stdout}}/qtip_result/ + - name: making consolidated report + shell: cd $HOME/qtip_result && python final_report.py Whetstone + - name: making directory + file: path={{home_dir.stdout}}/qtip_result/log state=directory + - name: copying result to temp directory + shell: cp -r $HOME/tempT/UnixBench/results/* $HOME/qtip_result/log/ + - name: registering files + shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2 + register: files_to_copy + - name: copy results + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/whetstone/whetstone_temp + with_items: files_to_copy.stdout_lines + - name: registering log files + shell: (cd $HOME/qtip_result/log/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2 + register: copy_log_results + - name: copying log results + fetch: src={{home_dir.stdout}}/qtip_result/log/{{item}} dest={{Dest_dir}}/whetstone/whetstone_temp + with_items: copy_log_results.stdout_lines + - name: cleaning tempT + shell: rm -rf $HOME/tempT + - name: cleaning_qtip_result + shell: rm -rf $HOME/qtip_result + + + - hosts: 127.0.0.1 + connection: local + tasks: + - name: extracting_json + shell: ( find {{Dest_dir}}/whetstone/whetstone_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/whetstone/) + - name: making_logs_folder + shell: mkdir -p {{Dest_dir}}/whetstone/logs + - name: extracting_log + shell: ( find {{Dest_dir}}/whetstone/whetstone_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/whetstone/logs) + - name: removing whetstone_temp + shell: rm -rf {{Dest_dir}}/whetstone/whetstone_temp diff --git a/foremancred b/foremancred deleted file mode 100644 index 4f238938..00000000 --- a/foremancred +++ /dev/null @@ -1,5 +0,0 @@ -export OS_USERNAME=admin -export OS_TENANT_NAME=admin -export OS_PASSWORD=octopus -export OS_AUTH_URL='http://172.18.0.27:5000/v2.0' -export PS1='[\u@\h \W(openstack_admin)]\$ ' |