notmuch/performance-test/T05-ruby.sh
David Bremner 126347b694 Import notmuch_0.38.2.orig.tar.xz
[dgit import orig notmuch_0.38.2.orig.tar.xz]
2023-12-01 07:51:09 -04:00

24 lines
493 B
Bash
Executable file

#!/usr/bin/env bash
test_description='ruby bindings'
. $(dirname "$0")/perf-test-lib.sh || exit 1
if [ "${NOTMUCH_HAVE_RUBY_DEV}" = "0" ]; then
echo "missing prerequisites: ruby development files"
exit 0
fi
time_start
time_run 'print all messages' "$NOTMUCH_RUBY -I '$NOTMUCH_BUILDDIR/bindings/ruby' <<'EOF'
require 'notmuch'
db = Notmuch::Database.new('$MAIL_DIR')
100.times.each do
db.query('').search_messages.each do |msg|
puts msg.message_id
end
end
EOF"
time_done