Debian Codegraph @

diskbench.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 usagescip-shell shell bbmap 39.20+dfsg-3 usage().(){
4 echoscip-shell system . . echo. "
5 Written by Brian Bushnell
6 Last modified March 5, 2018
7
8 Description: Benchmarks a disk with multithreaded I/O.
9
10 Usage: diskbench.sh path=<path> data=<8g> passes=<2> threads=<>
11
12 Parameters:
13 path= Location to read and write.
14 data=8g Number of bytes to process per pass.
15 threads= Number of threads to use. By default, all logical threads.
16 In RW mode the number of active threads is doubled.
17 mode=rw I/O mode:
18 r: Test read speed only.
19 w: Test write speed only.
20 rw: Test read and write speed simultaneously.
21
22 Processing parameters:
23 None yet!
24
25 Java Parameters:
26 -Xmx This will set Java's memory usage, overriding autodetection.
27 -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will
28 specify 200 megs. The max is typically 85% of physical memory.
29 -eoom This flag will cause the process to exit if an out-of-memory
30 exception occurs. Requires Java 8u92+.
31 -da Disable assertions.
32
33 Please contact Brian Bushnell at [email protected] if you encounter any problems.
34 "
35 }
36
37 #This block allows symlinked shellscripts to correctly set classpath.
38 pushd . > /dev/nullscip-shell filesystem . . `/dev/null`.
39 DIR="${BASH_SOURCE[0]}"
40 while [scip-shell system . . `[`. -h "$DIR" ]; do
41 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
42 DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")"
43 done
44 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
45 DIR="$(pwdscip-shell system . . pwd.)/"
46 popd > /dev/nullscip-shell filesystem . . `/dev/null`.
47
48 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
49 CP="$DIR""current/"
50
51 z="-Xmx400m"
52 z2="-Xms400m"
53 set=0
54
55 if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
56 usagescip-shell shell bbmap 39.20+dfsg-3 usage().
57 exit
58 fi
59
60 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () {
61 source "$DIR""/calcmem.sh"
62 setEnvironment
63 parseXmx "$@"
64 }
65 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@"
66
67 diskbenchscip-shell shell bbmap 39.20+dfsg-3 diskbench().() {
68 local CMD="java $EA $EOOM $z $z2 -cp $CP fun.DiskBench $@"
69 echoscip-shell system . . echo. $CMD >&2
70 eval $CMD
71 }
72
73 diskbenchscip-shell shell bbmap 39.20+dfsg-3 diskbench(). "$@"