unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: notmuch@notmuchmail.org
Cc: David Bremner <david@tethera.net>,
	Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH] perf-test: add ruby test
Date: Sat, 26 Jun 2021 15:07:14 -0500	[thread overview]
Message-ID: <20210626200714.100186-1-felipe.contreras@gmail.com> (raw)
In-Reply-To: <20210517193915.1220114-1-felipe.contreras@gmail.com>

Simply list the message-id of all the messages in a loop 100 times.

Suggested-by: David Bremner <david@tethera.net>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 performance-test/T05-ruby.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100755 performance-test/T05-ruby.sh

diff --git a/performance-test/T05-ruby.sh b/performance-test/T05-ruby.sh
new file mode 100755
index 00000000..527ab28b
--- /dev/null
+++ b/performance-test/T05-ruby.sh
@@ -0,0 +1,24 @@
+#!/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
-- 
2.32.0

  parent reply	other threads:[~2021-06-26 20:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 19:39 [PATCH 0/2] ruby: enable garbage collection Felipe Contreras
2021-05-17 19:39 ` [PATCH 1/2] ruby: create an actual wrapper struct Felipe Contreras
2021-07-18 22:58   ` David Bremner
2021-05-17 19:39 ` [PATCH 2/2] ruby: enable garbage collection using talloc Felipe Contreras
2021-06-11  0:46   ` David Bremner
2021-06-11  8:54     ` David Bremner
2021-06-26 19:07       ` Felipe Contreras
2021-06-26 19:54         ` David Bremner
2021-06-26 20:05           ` Felipe Contreras
2021-06-26 18:56     ` Felipe Contreras
2021-06-26 19:56       ` David Bremner
2021-05-22 10:49 ` [PATCH 0/2] ruby: enable garbage collection David Bremner
2021-05-28  3:10   ` Felipe Contreras
2021-06-26 20:07 ` Felipe Contreras [this message]
2021-07-18 22:54   ` [PATCH] perf-test: add ruby test David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210626200714.100186-1-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).