From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id hRlBBwOJ12AAoAAAgWs5BA (envelope-from ) for ; Sat, 26 Jun 2021 22:07:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qKNmAgOJ12CRNQAAB5/wlQ (envelope-from ) for ; Sat, 26 Jun 2021 20:07:31 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 660371392C for ; Sat, 26 Jun 2021 22:07:30 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id DCC68290EB; Sat, 26 Jun 2021 16:07:24 -0400 (EDT) Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by mail.notmuchmail.org (Postfix) with ESMTPS id A8F3C290D6 for ; Sat, 26 Jun 2021 16:07:21 -0400 (EDT) Received: by mail-oi1-x22c.google.com with SMTP id d19so15951135oic.7 for ; Sat, 26 Jun 2021 13:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q034CWCeijOhH/8aJFPnlJUUrAzF0UdgRKcBw0kybxw=; b=kMW0TP8ANVnIO9S/TFXVE/HFVhqtWWraJF6BN+EowzhvnIUa5zlrl4++YyIrUnjwe9 KP6zW2rq7nNpos+LpTtN9JsjGNG2MFwlqzA9CprZ+DsfOP6nerd/NQ3YMhaQFAQLU0Ml dSyFxHSnuNRED7bWzc1OeR/Pm+g+bdag6pcmxTuCfIbs/0Og66zgXQCy5Q3wR9SWxUyW V7Yth+E3iB6Jd93gAnOq/jXq/zIl1vXKsQ5xzQGf1Tf407+xkaTMn0lIaj4ukgI//8Ld gZ6pTaBhXn9RneOBbHBf+P403/YkhBD6+UMcOp9dn7Uq8muKNJhjDiRj+Ap5YxStvx93 eXMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q034CWCeijOhH/8aJFPnlJUUrAzF0UdgRKcBw0kybxw=; b=kILA95uTsXoVnU2rfG7zGCwObcZo1Ex+iiPijNAlfNMa+GECtD9qj8QehxOPU0+8Hh U5sjlD0OPrHXKtbeq4BcIv0dMuBulVP59AO+H2SaIVZ6rFT9HyDnkw4+dXJFAC2UDbTj L2YNnYyIqrU4r96P5tPre510PLknnQUQzmDS2+h/Q/zAJugw97nNi6XdpOxtTOctiE0i kFNfLDVWCGlAZsOjQdgEzspU08SJs7NqGno5YEsxwnKXDE+XpvrbkpinMuw1HFXTU5Xr LnRQ6EJv9oo3unOJdA0Cn2h1XUAOYn0oyNsKglMZ0FqxbbiwO0q2LrphjuttbFgKm1mB VOiw== X-Gm-Message-State: AOAM532WWdjBtqhsfGYTnX9avDjyxOYwd4WpkNZ4o6TDX/I8XjSNZq70 Yzmq7qGVFkl5p4r0RXCr2Tnsb8WFwIRrGA== X-Google-Smtp-Source: ABdhPJzFZsnf8yrMHnS01Q/isNiwV9Ta3pNgA9z5NJNRgcVJpk+966gtfNBjdI4PWdt7V3pvyYpisA== X-Received: by 2002:a05:6808:10a:: with SMTP id b10mr15195463oie.65.1624738040673; Sat, 26 Jun 2021 13:07:20 -0700 (PDT) Received: from localhost (fixed-187-189-165-231.totalplay.net. [187.189.165.231]) by smtp.gmail.com with ESMTPSA id k84sm2131915oia.8.2021.06.26.13.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Jun 2021 13:07:20 -0700 (PDT) From: Felipe Contreras To: notmuch@notmuchmail.org Cc: David Bremner , Felipe Contreras Subject: [PATCH] perf-test: add ruby test Date: Sat, 26 Jun 2021 15:07:14 -0500 Message-Id: <20210626200714.100186-1-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210517193915.1220114-1-felipe.contreras@gmail.com> References: <20210517193915.1220114-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Message-ID-Hash: WXBB7OIA7FD4IGGF4YFVQUNV7F2JCUG3 X-Message-ID-Hash: WXBB7OIA7FD4IGGF4YFVQUNV7F2JCUG3 X-MailFrom: felipe.contreras@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624738050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=JWBKkoVfERTrx+RgjpgKNYgt0dayHlm2vWt69ZLOy68=; b=BmcSHtQuf4XcdPq5zkK1nZ9ry6MuZvgY4NIppLP0z8qE3+ChJlUBtV54fpbGw5TGYtqFPJ xCb973Y1cOgyswG97ThAhWszDhKwXyQTR7N20lOq4JgsMox/sSvzu5tMzqBkfdF4uykgDr e/KVR9GKANLWz8h3T1rbG4skuq8HVT6MqlHHv4NizzdOYYPoZ3TLub/ho38RU5EhwxYb5Q IhuTjnA4uuiV2RhaYjISM9+Q+sb5lxSlcTjMwgLbo1Qbu9gOQCVMghsTsHwkFAQEbgj2cH yp+n50yLm3AqeJjS4XtK5A0PySqbB4V2RhGsGgOy7Fup2qrgH8rH+0h9bO9p0w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624738050; a=rsa-sha256; cv=none; b=GcdGtceP81OAUVSS8Mw+en1qa0bsxUlYHCTG+/yD1Bd9QBkZnPMMnLhlziAT4SkGwcYgjQ LENfoGrUAZ3tIsJBBBXTG3DAS3YWgVgAsBGwubi6oKWuUUZXXA5rL/8G4PLTIxO/Y9aZji /+tUoXrxN6NQ/jDGuPMdApyJA0C8BWhGIVoxWtkr+zGEURkfeueDzhC66lmtcPxWkUP37P CJHpljQjxpp9f+stubabZP9MHp079FAA7WFYMG/AK68HtBXqzwX0emdID5WQVhjAaNy10d 6Mv6yZi+jN8v7jOgGkzOG3/6iEBibfK4x80MYi6/JVfDmBxSrsbeuRMl9Rh0pQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=kMW0TP8A; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.91 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=kMW0TP8A; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 660371392C X-Spam-Score: -0.91 X-Migadu-Scanner: scn1.migadu.com X-TUID: vrz2VYw9JgBN Simply list the message-id of all the messages in a loop 100 times. Suggested-by: David Bremner Signed-off-by: Felipe Contreras --- 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