Browse Source

Performance benchmarks option on control panel

Bob Mottram 7 years ago
parent
commit
8b44ee274a
1 changed files with 19 additions and 4 deletions
  1. 19
    4
      src/freedombone-controlpanel

+ 19
- 4
src/freedombone-controlpanel View File

1803
     "${PROJECT_NAME}-wifi" --disable $disable_wifi
1803
     "${PROJECT_NAME}-wifi" --disable $disable_wifi
1804
 }
1804
 }
1805
 
1805
 
1806
+function performance_benchmarks {
1807
+    clear
1808
+    test_drive=/dev/sda1
1809
+    if [ -f /dev/mmcblk0 ]; then
1810
+        test_drive=/dev/mmcblk0
1811
+    fi
1812
+    echo ''
1813
+    echo $"Testing read speed from drive $test_drive"
1814
+    echo ''
1815
+    hdparm -t $test_drive
1816
+    any_key
1817
+}
1818
+
1806
 function add_clacks {
1819
 function add_clacks {
1807
     clacks=
1820
     clacks=
1808
 
1821
 
1929
            12 $"Wifi menu"
1942
            12 $"Wifi menu"
1930
            13 $"Add Clacks"
1943
            13 $"Add Clacks"
1931
            14 $"Check for updates"
1944
            14 $"Check for updates"
1932
-           15 $"Power off the system"
1933
-           16 $"Restart the system")
1945
+           15 $"Performance Benchmarks"
1946
+           16 $"Power off the system"
1947
+           17 $"Restart the system")
1934
 
1948
 
1935
         # shellcheck disable=SC2068
1949
         # shellcheck disable=SC2068
1936
         selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Administrator Control Panel" --menu $"Choose an operation, or ESC to exit:" 24 60 24 "${W[@]}" 3>&2 2>&1 1>&3)
1950
         selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Administrator Control Panel" --menu $"Choose an operation, or ESC to exit:" 24 60 24 "${W[@]}" 3>&2 2>&1 1>&3)
1959
             12) menu_wifi;;
1973
             12) menu_wifi;;
1960
             13) add_clacks;;
1974
             13) add_clacks;;
1961
             14) check_for_updates;;
1975
             14) check_for_updates;;
1962
-            15) shut_down_system;;
1963
-            16) restart_system;;
1976
+            15) performance_benchmarks;;
1977
+            16) shut_down_system;;
1978
+            17) restart_system;;
1964
         esac
1979
         esac
1965
     done
1980
     done
1966
 }
1981
 }