]> git.cworth.org Git - notmuch/blob - performance-test/T05-ruby.sh
ruby: tags: return string array directly
[notmuch] / performance-test / T05-ruby.sh
1 #!/usr/bin/env bash
2
3 test_description='ruby bindings'
4
5 . $(dirname "$0")/perf-test-lib.sh || exit 1
6
7 if [ "${NOTMUCH_HAVE_RUBY_DEV}" = "0" ]; then
8     echo "missing prerequisites: ruby development files"
9     exit 0
10 fi
11
12 time_start
13
14 time_run 'print all messages' "$NOTMUCH_RUBY -I '$NOTMUCH_BUILDDIR/bindings/ruby' <<'EOF'
15 require 'notmuch'
16 db = Notmuch::Database.new('$MAIL_DIR')
17 100.times.each do
18     db.query('').search_messages.each do |msg|
19         puts msg.message_id
20     end
21 end
22 EOF"
23
24 time_done