{"id":11317,"url":"https://patchwork.libcamera.org/api/patches/11317/?format=json","web_url":"https://patchwork.libcamera.org/patch/11317/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210217092937.17167-2-paul.elder@ideasonboard.com>","date":"2021-02-17T09:29:37","name":"[libcamera-devel,2/2] utils: tracepoints: ipa call analyzer: Fix std dev calculation for single value","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"3ef3c5a0d26d3fca594e9363d0321aac8ad016e3","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":{"id":17,"url":"https://patchwork.libcamera.org/api/users/17/?format=json","username":"epaul","first_name":"Paul","last_name":"Elder","email":"paul.elder@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/11317/mbox/","series":[{"id":1699,"url":"https://patchwork.libcamera.org/api/series/1699/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1699","date":"2021-02-17T09:29:36","name":"[libcamera-devel,1/2] utils: ipc: Generate tracepoints for IPA calls","version":1,"mbox":"https://patchwork.libcamera.org/series/1699/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11317/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11317/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 03B4BBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Feb 2021 09:29:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C48BC637FA;\n\tWed, 17 Feb 2021 10:29:54 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9251B637FA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Feb 2021 10:29:53 +0100 (CET)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EB3718C4;\n\tWed, 17 Feb 2021 10:29:51 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"hrFjpYFf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1613554193;\n\tbh=SU8/E068vHsuNjFU0poZ7rITK9w2vs+6KmVek7pZxIU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=hrFjpYFfeDuDvVwFKAmTTA+zuu14VFtqWyAE0jUrFdg8Mr8wnSEmDVFCRpc/CucmH\n\tN6NBg/XQd43VgLNra2K/CbmtXHpyc4VaAhHAVn8Q9N/MXfl+ZL5o+X9Qi5VXABmxad\n\tiidz4M7auqah8tKVpHvhoiM0nZXzsybvKDubpx20=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 17 Feb 2021 18:29:37 +0900","Message-Id":"<20210217092937.17167-2-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.27.0","In-Reply-To":"<20210217092937.17167-1-paul.elder@ideasonboard.com>","References":"<20210217092937.17167-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 2/2] utils: tracepoints: ipa call\n\tanalyzer: Fix std dev calculation for single value","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Some IPA calls might only be called once, such as configure(), start(),\nstop(), etc. This causes the analyzer to break as stddev() on a single\nvalue is invalid. Set the stddev to zero if there is only one datapoint.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n utils/tracepoints/analyze-ipa-trace.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/utils/tracepoints/analyze-ipa-trace.py b/utils/tracepoints/analyze-ipa-trace.py\nindex 50fbbf42..cd7e9ffc 100755\n--- a/utils/tracepoints/analyze-ipa-trace.py\n+++ b/utils/tracepoints/analyze-ipa-trace.py\n@@ -58,7 +58,7 @@ def main(argv):\n     rows.append(['pipeline:function', 'min', 'max', 'mean', 'stddev'])\n     for k, v in samples.items():\n         mean = int(stats.mean(v))\n-        stddev = int(stats.stdev(v))\n+        stddev = int(stats.stdev(v)) if len(v) > 1 else 0\n         minv = min(v)\n         maxv = max(v)\n         rows.append([k, str(minv), str(maxv), str(mean), str(stddev)])\n","prefixes":["libcamera-devel","2/2"]}