27 lines · 758 B · Shell
RawDownload
#!/usr/bin/env bash cd $(dirname $0)source testbase.sh export VERIFY_SNAPS=no # Override profile setting CHECK_DEPS dc zcatSCRIPT=vtscript.gzCHECK_FILES ${SCRIPT}TIMES=400BYTES=$(zcat ${SCRIPT} | wc -c) echo "Sending ${SCRIPT} (uncompressed) to the terminal." > ${TEST_LOG}echo "Filesize: ${BYTES} bytes" >> ${TEST_LOG}echo "Repeated: ${TIMES} times" >> ${TEST_LOG}echo "Timings in seconds:" >> ${TEST_LOG} IN "{ time -p for i in \$(seq 1 ${TIMES}); do zcat ${SCRIPT}; done } 2>>${TEST_LOG} && touch .complete\r" WAIT_FOR_DOT_COMPLETE real_secs=$(grep "^real" ${TEST_LOG} | awk '{print $2}')bytes_per_sec=$(dc -e "${BYTES} ${TIMES} * ${real_secs} / p")echo "Calculated throughput: ${bytes_per_sec} bytes/sec" >> ${TEST_LOG} cat ${TEST_LOG}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t