Andrew Geissler | eef6386 | 2021-01-29 15:58:13 -0600 | [diff] [blame] | 1 | From 353e8a62bf3cb5f1b9504efa16b8b974e93cac49 Mon Sep 17 00:00:00 2001 |
| 2 | From: He Zhe <zhe.he@windriver.com> |
| 3 | Date: Fri, 22 Jan 2021 10:58:41 +0800 |
| 4 | Subject: [PATCH] lmbench: Point webpage-lm to target directory |
| 5 | |
| 6 | As webpage-lm.tar has been copied to ${datadir}\lmbench. |
| 7 | Plus improve 'hello' copying in lmbench script. |
| 8 | |
| 9 | Signed-off-by: He Zhe <zhe.he@windriver.com> |
| 10 | --- |
| 11 | scripts/lmbench | 18 +++++++++--------- |
| 12 | 1 file changed, 9 insertions(+), 9 deletions(-) |
| 13 | |
| 14 | diff --git a/scripts/lmbench b/scripts/lmbench |
| 15 | index 7a52cb1..82e36b6 100755 |
| 16 | --- a/scripts/lmbench |
| 17 | +++ b/scripts/lmbench |
| 18 | @@ -167,7 +167,7 @@ if [ X$BENCHMARK_OS = XYES -o X$BENCHMARK_UNIX = XYES ]; then |
| 19 | lat_unix -P $SYNC_MAX |
| 20 | fi |
| 21 | if [ X$BENCHMARK_OS = XYES -o X$BENCHMARK_PROC = XYES ]; then |
| 22 | - cp hello /tmp/hello |
| 23 | + cp `which hello` /tmp/hello |
| 24 | for i in fork exec shell |
| 25 | do lat_proc -P $SYNC_MAX $i |
| 26 | done |
| 27 | @@ -237,14 +237,14 @@ fi |
| 28 | |
| 29 | date >> ${OUTPUT} |
| 30 | echo Local networking >> ${OUTPUT} |
| 31 | -if [ ! -d ../../src/webpage-lm ] |
| 32 | -then (cd ../../src && tar xf webpage-lm.tar) |
| 33 | +if [ ! -d /usr/share/lmbench/webpage-lm ] |
| 34 | +then (cd /usr/share/lmbench && tar xf webpage-lm.tar) |
| 35 | sync |
| 36 | sleep 1 |
| 37 | fi |
| 38 | SERVERS="lat_udp lat_tcp lat_rpc lat_connect bw_tcp" |
| 39 | for server in $SERVERS; do $server -s; done |
| 40 | -DOCROOT=../../src/webpage-lm lmhttp 8008 & |
| 41 | +DOCROOT=/usr/share/lmbench/webpage-lm lmhttp 8008 & |
| 42 | sleep 2; |
| 43 | |
| 44 | if [ X$BENCHMARK_OS = XYES -o X$BENCHMARK_UDP = XYES ]; then |
| 45 | @@ -280,15 +280,15 @@ bw_tcp -S localhost |
| 46 | |
| 47 | if [ X$BENCHMARK_OS = XYES -o X$BENCHMARK_HTTP = XYES ]; then |
| 48 | # I want a hot cache number |
| 49 | - lat_http localhost 8008 < ../../src/webpage-lm/URLS > /dev/null 2>&1 |
| 50 | - lat_http localhost 8008 < ../../src/webpage-lm/URLS |
| 51 | + lat_http localhost 8008 < /usr/share/lmbench/webpage-lm/URLS > /dev/null 2>&1 |
| 52 | + lat_http localhost 8008 < /usr/share/lmbench/webpage-lm/URLS |
| 53 | fi |
| 54 | lat_http -S localhost 8008 |
| 55 | |
| 56 | for remote in $REMOTE |
| 57 | do |
| 58 | echo Networking to $remote >> ${OUTPUT} |
| 59 | - $RCP $SERVERS lmhttp ../../src/webpage-lm.tar ${remote}:/tmp |
| 60 | + $RCP $SERVERS lmhttp /usr/share/lmbench/webpage-lm.tar ${remote}:/tmp |
| 61 | for server in $SERVERS |
| 62 | do $RSH $remote -n /tmp/$server -s & |
| 63 | done |
| 64 | @@ -327,8 +327,8 @@ do |
| 65 | |
| 66 | if [ X$BENCHMARK_OS = XYES -o X$BENCHMARK_HTTP = XYES ]; then |
| 67 | # I want a hot cache number |
| 68 | - lat_http $remote 8008 < ../../src/webpage-lm/URLS > /dev/null 2>&1 |
| 69 | - lat_http $remote 8008 < ../../src/webpage-lm/URLS |
| 70 | + lat_http $remote 8008 < /usr/share/lmbench/webpage-lm/URLS > /dev/null 2>&1 |
| 71 | + lat_http $remote 8008 < /usr/share/lmbench/webpage-lm/URLS |
| 72 | fi |
| 73 | lat_http -S $remote 8008 |
| 74 | |
| 75 | -- |
| 76 | 2.17.1 |
| 77 | |