From: Wael M. Nasreddine Date: Sat, 10 May 2014 21:40:10 +0000 (+1700) Subject: [PATCH] ruby: Add wrapper for notmuch_query_count_threads X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=17ab3655a07da09431f1ebb5b87dde07110e69d2;p=notmuch-archives.git [PATCH] ruby: Add wrapper for notmuch_query_count_threads --- diff --git a/8a/3005bebb6fb4212ae99809e58a6fd89a52cf8c b/8a/3005bebb6fb4212ae99809e58a6fd89a52cf8c new file mode 100644 index 000000000..53b4edc02 --- /dev/null +++ b/8a/3005bebb6fb4212ae99809e58a6fd89a52cf8c @@ -0,0 +1,67 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 4B282431FC2 + for ; Sat, 10 May 2014 14:40:22 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id widObpTByLOR for ; + Sat, 10 May 2014 14:40:17 -0700 (PDT) +Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com + [209.85.220.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 79B2F431FBF + for ; Sat, 10 May 2014 14:40:17 -0700 (PDT) +Received: by mail-pa0-f42.google.com with SMTP id rd3so5864345pab.29 + for ; Sat, 10 May 2014 14:40:16 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:date:message-id; + bh=iva44FRrQeD7yFxdEWrn+LtdG1DRWqkuAl16k+6LPwc=; + b=Yf8W+ylKebMhqKlWeGKUpBDZNEE//T2ia+3CkLXaSOzbZGGO3hrxn+sqK8M6Pb3nE6 + ghNa3TPRfJm5X7z7fDhvWVHOThQvSA3aRdTH+vIJbekmP03NR1ACn1zq1AY6uIUVUZvw + 7L6q/9puu+C4tHCpIvo3w1KgjWEDQKk/1x55PF6Ckk/bvZ9KZN+B4yXUqXQuy6ZTejRL + HGnICiEtOA1TFsMoT3dwkGvaVJGJini1iOBqoJIuK8JOqcph1oLwJ9Tq0K/E62VV0rP/ + x/XizZW0i5WblbQN2i74dUIHhtLPDA07u23uxm+orGzkRW0694FgpO6VGcJMJXaTADLo + gtyA== +X-Received: by 10.67.2.34 with SMTP id bl2mr36866952pad.58.1399758016743; + Sat, 10 May 2014 14:40:16 -0700 (PDT) +Received: from localhost ([2620:0:1000:2e00:dc94:fbf5:1606:3c5b]) + by mx.google.com with ESMTPSA id + wp3sm14497556pbc.67.2014.05.10.14.40.15 for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 10 May 2014 14:40:16 -0700 (PDT) +From: "Wael M. Nasreddine" +To: notmuch@notmuchmail.org +Subject: [PATCH] ruby: Add wrapper for notmuch_query_count_threads +Date: Sat, 10 May 2014 14:40:10 -0700 +Message-Id: <1399758011-26217-1-git-send-email-wael.nasreddine@gmail.com> +X-Mailer: git-send-email 1.9.1.423.g4596e3a +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 10 May 2014 21:40:22 -0000 + + +This patch exposes query.cc::notmuch_query_count_threads to Ruby, the +benchmark on 85k emails is amazing: + + user system total real +query.count_threads 6.270000 0.240000 6.510000 ( 6.507064) +query.search_threads.count 14.040000 3.130000 17.170000 ( 17.172222)