parent
e19d007ca7
commit
306eb39b16
@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
expected_result="This is q handw__tten
|
||||
examp(e for _0CR,
|
||||
Write as good as yo_ c4n."
|
||||
|
||||
success_count=0
|
||||
total_count=1000
|
||||
|
||||
for ((i = 0; i < total_count; i++)); do
|
||||
echo "$i"
|
||||
result=$(curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@handwrt1.pnm" localhost:10000 2>/dev/null)
|
||||
# echo "$result"
|
||||
if [[ "$result" == "$expected_result" ]]; then
|
||||
success_count=$((success_count + 1))
|
||||
else
|
||||
echo "FAIL"
|
||||
echo "Expected $expected_result"
|
||||
echo "Was $result"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$success_count / $total_count"
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,2 @@
|
||||
pnm file was generated as follows
|
||||
`pngtopnm 5x8.png >5x8.pnm`
|
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Executes the runtime in GDB
|
||||
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
|
||||
# This allows debugging outside of the Docker container
|
||||
# Also disables pagination and stopping on SIGUSR1
|
||||
|
||||
experiment_directory=$(pwd)
|
||||
project_directory=$(cd ../../.. && pwd)
|
||||
binary_directory=$(cd "$project_directory"/bin && pwd)
|
||||
|
||||
export LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH"
|
||||
export PATH="$binary_directory:$PATH"
|
||||
|
||||
gdb --eval-command="handle SIGUSR1 nostop" \
|
||||
--eval-command="handle SIGPIPE nostop" \
|
||||
--eval-command="set pagination off" \
|
||||
--eval-command="set substitute-path /sledge/runtime $project_directory" \
|
||||
--eval-command="run $experiment_directory/spec.json" \
|
||||
sledgert
|
@ -0,0 +1,2 @@
|
||||
ABCD abcd EFGHI efghi JKLMN jklmn OPQR opqr
|
||||
STUVW stuvw XYZ xyz 12345 67890 !?'&/\=+-*#(){}[]<>
|
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
# Executes the runtime in GDB
|
||||
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
|
||||
# This allows debugging outside of the Docker container
|
||||
# Also disables pagination and stopping on SIGUSR1
|
||||
|
||||
experiment_directory=$(pwd)
|
||||
project_directory=$(cd ../../.. && pwd)
|
||||
binary_directory=$(cd "$project_directory"/bin && pwd)
|
||||
|
||||
if [ "$1" != "-d" ]; then
|
||||
PATH="$binary_directory:$PATH" LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH" sledgert "$experiment_directory/spec.json" &
|
||||
sleep 1
|
||||
else
|
||||
echo "Running under gdb"
|
||||
fi
|
||||
|
||||
expected_result="$(cat ./expected_result.txt)"
|
||||
|
||||
success_count=0
|
||||
total_count=50
|
||||
|
||||
for ((i = 0; i < total_count; i++)); do
|
||||
echo "$i"
|
||||
result=$(curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@5x8.pnm" localhost:10000 2>/dev/null)
|
||||
# echo "$result"
|
||||
if [[ "$result" == "$expected_result" ]]; then
|
||||
success_count=$((success_count + 1))
|
||||
else
|
||||
echo "FAIL"
|
||||
echo "Expected:"
|
||||
echo "$expected_result"
|
||||
echo "==============================================="
|
||||
echo "Was:"
|
||||
echo "$result"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$success_count / $total_count"
|
||||
|
||||
if [ "$1" != "-d" ]; then
|
||||
sleep 5
|
||||
echo -n "Running Cleanup: "
|
||||
pkill sledgert >/dev/null 2>/dev/null
|
||||
pkill wrk >/dev/null 2>/dev/null
|
||||
echo "[DONE]"
|
||||
fi
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"active": "yes",
|
||||
"name": "gocr",
|
||||
"path": "gocr.aso",
|
||||
"port": 10000,
|
||||
"relative-deadline-us": 50000000000,
|
||||
"argsize": 1,
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 1024000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024000,
|
||||
"http-resp-content-type": "text/plain"
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Executes the runtime in GDB
|
||||
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
|
||||
# This allows debugging outside of the Docker container
|
||||
# Also disables pagination and stopping on SIGUSR1
|
||||
|
||||
experiment_directory=$(pwd)
|
||||
project_directory=$(cd ../../.. && pwd)
|
||||
binary_directory=$(cd "$project_directory"/bin && pwd)
|
||||
|
||||
export LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH"
|
||||
export PATH="$binary_directory:$PATH"
|
||||
|
||||
gdb --eval-command="handle SIGUSR1 nostop" \
|
||||
--eval-command="handle SIGPIPE nostop" \
|
||||
--eval-command="set pagination off" \
|
||||
--eval-command="set substitute-path /sledge/runtime $project_directory" \
|
||||
--eval-command="run $experiment_directory/spec.json" \
|
||||
sledgert
|
@ -0,0 +1,3 @@
|
||||
This is q handw__tten
|
||||
examp(e for _0CR,
|
||||
Write as good as yo_ c4n.
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
# Executes the runtime in GDB
|
||||
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
|
||||
# This allows debugging outside of the Docker container
|
||||
# Also disables pagination and stopping on SIGUSR1
|
||||
|
||||
experiment_directory=$(pwd)
|
||||
project_directory=$(cd ../../.. && pwd)
|
||||
binary_directory=$(cd "$project_directory"/bin && pwd)
|
||||
|
||||
if [ "$1" != "-d" ]; then
|
||||
PATH="$binary_directory:$PATH" LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH" sledgert "$experiment_directory/spec.json" &
|
||||
sleep 1
|
||||
else
|
||||
echo "Running under gdb"
|
||||
fi
|
||||
|
||||
expected_result="$(cat ./expected_result.txt)"
|
||||
|
||||
success_count=0
|
||||
total_count=50
|
||||
|
||||
for ((i = 0; i < total_count; i++)); do
|
||||
echo "$i"
|
||||
result=$(curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@handwrt1.pnm" localhost:10000 2>/dev/null)
|
||||
# echo "$result"
|
||||
if [[ "$result" == "$expected_result" ]]; then
|
||||
success_count=$((success_count + 1))
|
||||
else
|
||||
echo "FAIL"
|
||||
echo "Expected:"
|
||||
echo "$expected_result"
|
||||
echo "==============================================="
|
||||
echo "Was:"
|
||||
echo "$result"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$success_count / $total_count"
|
||||
|
||||
if [ "$1" != "-d" ]; then
|
||||
sleep 5
|
||||
echo -n "Running Cleanup: "
|
||||
pkill sledgert >/dev/null 2>/dev/null
|
||||
pkill wrk >/dev/null 2>/dev/null
|
||||
echo "[DONE]"
|
||||
fi
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"active": "yes",
|
||||
"name": "gocr",
|
||||
"path": "gocr.aso",
|
||||
"port": 10000,
|
||||
"relative-deadline-us": 50000000000,
|
||||
"argsize": 1,
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 1024000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024000,
|
||||
"http-resp-content-type": "text/plain"
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
# A Page from Dr. Jekyll and Mister Hyde
|
||||
|
||||
This is a larger OCR example. The \*.pnm file is 5mb or so.
|
||||
|
||||
In the future, this OCR example might be a good use case for a "step-wise" function, as the file is substantially smaller before conversion to the \*.pnm format.
|
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Executes the runtime in GDB
|
||||
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
|
||||
# This allows debugging outside of the Docker container
|
||||
# Also disables pagination and stopping on SIGUSR1
|
||||
|
||||
experiment_directory=$(pwd)
|
||||
project_directory=$(cd ../../.. && pwd)
|
||||
binary_directory=$(cd "$project_directory"/bin && pwd)
|
||||
|
||||
export LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH"
|
||||
export PATH="$binary_directory:$PATH"
|
||||
|
||||
gdb --eval-command="handle SIGUSR1 nostop" \
|
||||
--eval-command="handle SIGPIPE nostop" \
|
||||
--eval-command="set pagination off" \
|
||||
--eval-command="set substitute-path /sledge/runtime $project_directory" \
|
||||
--eval-command="run $experiment_directory/spec.json" \
|
||||
sledgert
|
@ -0,0 +1,33 @@
|
||||
at his to4ch of a certain icy pang along my blood. "Come, sir;' said I.
|
||||
"Yo4 forget that I have not yet the pleas4re ofyo4r acq4aintance. Be
|
||||
seated, if yo4 please: And I showed him an example, and sat down
|
||||
myself in my c4stomary seat and with as fair an imitation of my or-
|
||||
dinary manner to a patient, as the lateness of the ho4r, the nat4re of
|
||||
my preocc4pations, and the horror I had of my visitor, wo4ld s4_er
|
||||
me to m4ster.
|
||||
"I beg yo4r pardon, Dr. Lanyon;' he replied civilly eno4gh. "What
|
||||
yo4 say is very well fo4nded; and my impatience has shown its heels
|
||||
to my politeness. I come here at the instance of yo4r colleag4e, Dr.
|
||||
Henry _ekyll, on a piece of b4siness of some moment; and I 4nder-
|
||||
stood.. ." He pa4sed and p4t his hand to his throat, and I co4ld see,
|
||||
in spite of his collected manner, that he was wrestling against the
|
||||
approaches of the hysteria-"I 4nderstood, a drawer.. ."
|
||||
B4t here I took pity on my visito(0xed)s s4spense, and some perhaps
|
||||
on my own growing c4riosity.
|
||||
"mere it is, sir;' said I, pointing to the drawer, where it lay on the
|
||||
noor behind a table and still covered with the sheet.
|
||||
He sprang to it, and then pa4sed, and laid his hand 4pon his
|
||||
heart; I co4ld hear his teeth grate with the conv4lsive action of his
|
||||
jaws; and his face was so ghastly to see that I grew alarmed both for
|
||||
his life and reason.
|
||||
"Compose yo4rself_' said I.
|
||||
He t4rned a dreadf4l smile to me, and as if with the decision of
|
||||
despair, pl4cked away the sheet. At sight of the contents, he 4ttered
|
||||
one lo4d sob of s4ch immense relief that I sat petri_ed. And the
|
||||
next moment, in a voice that was already fairly well 4nder control,
|
||||
"Have yo4 a grad4ated glass? " he asked.
|
||||
I rose from my place with something of an e_ort and gave him
|
||||
what he asked.
|
||||
He thanked me with a smiling nod, meas4red o4t a few min-
|
||||
ims of the red tinct4re and added one of the powders. me mix-
|
||||
t4re, which was at _rst of a reddish h4e, began, in proportion as the
|
Before Width: | Height: | Size: 823 KiB After Width: | Height: | Size: 823 KiB |
@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
# Executes the runtime in GDB
|
||||
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
|
||||
# This allows debugging outside of the Docker container
|
||||
# Also disables pagination and stopping on SIGUSR1
|
||||
|
||||
experiment_directory=$(pwd)
|
||||
project_directory=$(cd ../../.. && pwd)
|
||||
binary_directory=$(cd "$project_directory"/bin && pwd)
|
||||
|
||||
if [ "$1" != "-d" ]; then
|
||||
PATH="$binary_directory:$PATH" LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH" sledgert "$experiment_directory/spec.json" &
|
||||
sleep 1
|
||||
else
|
||||
echo "Running under gdb"
|
||||
fi
|
||||
|
||||
expected_result="$(cat ./expected_result.txt)"
|
||||
success_count=0
|
||||
total_count=50
|
||||
|
||||
for ((i = 0; i < total_count; i++)); do
|
||||
echo "$i"
|
||||
result=$(curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@hyde.pnm" localhost:10000 2>/dev/null)
|
||||
# echo "$result"
|
||||
if [[ "$result" == "$expected_result" ]]; then
|
||||
success_count=$((success_count + 1))
|
||||
else
|
||||
echo "FAIL"
|
||||
echo "Expected:"
|
||||
echo "$expected_result"
|
||||
echo "==============================================="
|
||||
echo "Was:"
|
||||
echo "$result"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$success_count / $total_count"
|
||||
|
||||
if [ "$1" != "-d" ]; then
|
||||
sleep 5
|
||||
echo -n "Running Cleanup: "
|
||||
pkill sledgert >/dev/null 2>/dev/null
|
||||
pkill wrk >/dev/null 2>/dev/null
|
||||
echo "[DONE]"
|
||||
fi
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"active": "yes",
|
||||
"name": "gocr",
|
||||
"path": "gocr.aso",
|
||||
"port": 10000,
|
||||
"relative-deadline-us": 50000000000,
|
||||
"argsize": 1,
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 5335057,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 5335057,
|
||||
"http-resp-content-type": "text/plain"
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
cd handwriting || exit
|
||||
./run.sh
|
||||
cd .. || exit
|
||||
cd hyde || exit
|
||||
./run.sh
|
||||
cd .. || exit
|
||||
cd fivebyeight || exit
|
||||
./run.sh
|
||||
cd ..
|
Loading…
Reference in new issue