Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 04434200BCF for ; Mon, 5 Dec 2016 17:03:25 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 02C83160B18; Mon, 5 Dec 2016 16:03:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 256CE160B09 for ; Mon, 5 Dec 2016 17:03:23 +0100 (CET) Received: (qmail 87170 invoked by uid 500); 5 Dec 2016 16:03:16 -0000 Mailing-List: contact dev-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list dev@asterixdb.apache.org Received: (qmail 87136 invoked by uid 99); 5 Dec 2016 16:03:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2016 16:03:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 6B4E11AB011 for ; Mon, 5 Dec 2016 16:03:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id GNymyY9yjs3U for ; Mon, 5 Dec 2016 16:03:06 +0000 (UTC) Received: from mail-oi0-f53.google.com (mail-oi0-f53.google.com [209.85.218.53]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 60CA25FC41 for ; Mon, 5 Dec 2016 16:03:06 +0000 (UTC) Received: by mail-oi0-f53.google.com with SMTP id b126so344141569oia.2 for ; Mon, 05 Dec 2016 08:03:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=3NtMCaIAaFRU/Lryk6anBXPzfadbFE+/k4Wyu53ljAI=; b=ncN6GD5w880fMM6Ue0olc8wvrW+c6volgSwRR86EFJdecZk2LQfW7/06Fi4I543yna jMqS4AxDI+KSjf/DBwLTjrnlECk5Zz0qrU+8gvE0yXCx0klGRqR/IXMBqe219eDD+mt0 SPJBdDXOUavE+/X9k4pYuQgoHqFKO3KhWkrx6BNAvUwkmsBx0moqZc34fyD7IcrBgOwl bx79oiJ1vYKpx/OrngtbuvviHWYy240LdxgVSrl+p5LbqkbgoiT1rfxe71pSojL6Qg0P IdsZGueSx2yVVLW1HaZUPz+9DdM5V+72P1iutP+9kEzpZQ0ef4ws9L2k9F5lH8JEkC2Q hrFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=3NtMCaIAaFRU/Lryk6anBXPzfadbFE+/k4Wyu53ljAI=; b=QuyRMXbZFyv/T2WBixjXI7GQZE9XJUmRVx7pUrO+3QcThy5dFyc3CfKopWk5qdytLz rXyYLdJGH//yqEDGc7s9Mtvu/o4+JHqZ6Gx6KIGqLhjQEg1t+TbOR3T8GS9ShiariDp3 b0PEZi0eB6OxLBjZgvh+vnORX3yurhVFKveWCOOMuAFFvPnKzQCkvj+KGCBx5wKnV5rb CaCNyvvl4sBy//pVSKMI+nhY9nQDtvNu47Zv5R5glyf5Snn8nHgTKP3toc9dy3U1qzsD vcWxADulQ5BFhMNSFmXlFRhKgo9Ju1e3Z2AL6ejkk6nYi6OaX2yTKnavq2EqdhdLkHpS B7ZQ== X-Gm-Message-State: AKaTC02OWzCo0JSBeT48DxiTJPPKYn8VMDfGjKEfjPQZD7OzKY3gao3g8XniHW735b7rbQ== X-Received: by 10.202.107.76 with SMTP id g73mr30484136oic.1.1480953725549; Mon, 05 Dec 2016 08:02:05 -0800 (PST) Received: from mikejcarey.local ([2600:8802:4500:fc:d9b6:80e2:b80e:6fb3]) by smtp.googlemail.com with ESMTPSA id e14sm6285096oic.26.2016.12.05.08.02.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Dec 2016 08:02:04 -0800 (PST) Subject: Re: [AsterixDB] execution time metric in the HTTP API To: dev@asterixdb.apache.org References: <2D54DF1B-65A3-4AC9-B503-275932E11DD5@stud.ntnu.no> <7B178564-0D18-4F7E-93C1-62ABC2E3AA6F@apache.org> <6B0A8058-688A-4AE6-BDF0-F8BCB2410ECB@stud.ntnu.no> <320EF41F-BF70-4212-A061-3A79D716E773@apache.org> From: Mike Carey Message-ID: Date: Mon, 5 Dec 2016 08:02:02 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <320EF41F-BF70-4212-A061-3A79D716E773@apache.org> Content-Type: multipart/alternative; boundary="------------25106CF9805693D78EEA8100" archived-at: Mon, 05 Dec 2016 16:03:25 -0000 --------------25106CF9805693D78EEA8100 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Agreed on this. Also, my recollection is that there were/are three combos of results and synchrony that we support - sync execution with results returned, sync execution with just a handle returned, and async execution with a handle returned. The handle can then be used to ask for the results in any case, when they are ready, and to ask "is it done yet" in the last of the three cases. For this use case, getting stats back, one would want case two (sync with handle) - right? The idea would be to not hear back until the work was done, but to not measure that final overhead of returning and swallowing the results themselves. On 12/4/16 9:20 PM, Till Westmann wrote: > I think that the best solution for your use-case would be to add deferred > result delivery for the query/service API, as > a) this API returns metrics today and > b) it anyway is a missing feature of this API. > I’ve filed an issue for this [1] and started work on it, but it’s not > quite > done yet … > > One of the additional challenges is, that the query/service API > currently only > supports SQL++ and not AQL. If you need AQL, we would also need to fix > another > issue [2]. > Which query language do you use (and does it matter for what you are > trying to > do)? > > Cheers, > Till > > [1] https://issues.apache.org/jira/browse/ASTERIXDB-1744 > [2] https://issues.apache.org/jira/browse/ASTERIXDB-1559 > > On 3 Dec 2016, at 6:47, Thor Martin Abrahamsen wrote: > >> Thanks for your suggestions, Pouria and Till. >> >> Using the «mode=asynchronous-deferred» returned only the handle, just >> as I wanted. But I am not getting any metrics with the response. Just >> the handle. The same goes for the request without the «mode» >> parameter: I only get the results, not any metrics. Is there a way to >> get metrics with the API response? Or is it possible to use >> «mode=asynchronous-deferred» in the web interface? >> >> The asterixClient worked perfectly, but the execution time returned >> is calculated in the client, not by AsterixDB (please correct me if >> I’m wrong Pouria). Ideally I would like the isolated AsterixDB >> execution time, and don’t consider network delay or client >> performance. I might try running the client on the same node as the >> CC :) >> >> >> >> Best regards >> Thor Martin Abrahamsen >> Student @ NTNU >> Tlf. +47 470 78 713 >> >> 2. des. 2016 kl. 20.45 skrev Till Westmann >> >: >> >> Hi, >> >> an alternative to using the client that Pouria suggested would be to add >> "mode=asynchronous-deferred" as an HTTP parameter when talking to the >> API. In >> that case the query should be evaluated completely and an HTTP >> response should >> come back - however without the result. Instead the response should >> contain a >> handle where you could pick up the query result (which you could >> choose not to >> do). >> I'm using "should" a lot, as I haven't used this feature for a while, >> and so my >> recollection of what it does might be buggy or outdated. >> >> Cheers, >> Till >> >> On 2 Dec 2016, at 11:16, Pouria Pirzadeh wrote: >> >> You may find the following client useful. >> It works against the HTTP, runs query workload for one or more >> iterations >> and dumps the response time per query/iteration in a stats file. >> >> https://github.com/pouriapirz/asterixClient >> >> Pouria >> >> On Fri, Dec 2, 2016 at 10:45 AM, Thor Martin Abrahamsen >> > wrote: >> >> Hi, >> >> Is it possible to get the execution time metric in the HTTP API? >> >> I’m running some queries and are interested in the execution time. In >> the >> web interface the duration is printed below the results, but I want the >> queries to execute without printing the results. Either in the web >> interface, or through the API. The specific query is iterating through a >> dataset and applying a library function on each record. >> >> I am working on a student project together with Heri. >> >> >> Mvh. >> Thor Martin Abrahamsen >> Student @ NTNU >> Tlf. +47 470 78 713 --------------25106CF9805693D78EEA8100--