From patchwork Fri May 3 14:43:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ninette Adhikari X-Patchwork-Id: 43244 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF340C10F16 for ; Fri, 3 May 2024 14:43:49 +0000 (UTC) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mx.groups.io with SMTP id smtpd.web11.14880.1714747427174534860 for ; Fri, 03 May 2024 07:43:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@thehoodiefirm-com.20230601.gappssmtp.com header.s=20230601 header.b=qJDCBsGR; spf=neutral (domain: thehoodiefirm.com, ip: 209.85.208.41, mailfrom: ninette@thehoodiefirm.com) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-572adaa172cso2427894a12.1 for ; Fri, 03 May 2024 07:43:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thehoodiefirm-com.20230601.gappssmtp.com; s=20230601; t=1714747425; x=1715352225; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=7lDlcqKNspL3K1VgWcO6LUgJSEP1qm/7i0L+k+2Hh0U=; b=qJDCBsGRZSwTdqxfARFtvIP7XS5e6oY2gxBxmVkS+EcVKU7BvHGR5SSsBIdj2ce8p+ RrxEyMBw77hrItGp9E/9xCDFT4pY4i/z2QWUOWWFjnRufzJ9P7oEpdAeOEG/nFP9kj1e VtQfsuagY3x9yBy8WPeyzyYW+iwKExl4BSafm3qo7cdQPeyGfgg7DOXKy2+B9W5B9spN WTIEprFfnn1drx8yaegaesum9VH2hzvY0QTaaJDiwCZZvliIOjXsnCf9yJX1iZT0/K/l T1mUH5fjwiaHFezFnnBsaMQVJAh4E5N/miJrm8FXOq123laCFQKzpa7+naWk8oAn+rVm vMHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714747425; x=1715352225; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7lDlcqKNspL3K1VgWcO6LUgJSEP1qm/7i0L+k+2Hh0U=; b=h2JqF8roqbOmyaHCxPnLsc3PuqdhzLLJwWxH1K7r7L4rCb1OFiLmyOALrBiEuFISjd QSTTjRo+RdE1hqDD5vjoDtNdAN9vy1hxmyZDlNd5pJJuT5AkyQ4XX7ZlLbAX0pae17BV 4b9uTJucsq/ngvajIMQ2H9Wkz1GsA8BXbWyWn5mKB2/tn1CIYofBMMPgxsMQ0gdh0XcE htuQD3Yixo2ePlaenDRzOnmbSk5tGj3b43pry/MsBY3tfzpRzSAXZFVE6b/hrpYS9hHV oASTWRTxrFP47WA2SG7mOHTv/duW97ohSIwJKfjnlumNgYwQi0axNXgnZi8zQ4VyhiwN X5Ww== X-Gm-Message-State: AOJu0Yz3oMn3sdGlPn4CTaQ/k6jIiZ/Qkxg+QDNNBSNXrQsZ/3zC2tUu gWws6P+cThhzz5bpMcmUL3zHP/ayIvlb4Wlrh4T/A+1tlKQvcIktEi+WQLeh6w3BaEsb0LQuArl w4kM= X-Google-Smtp-Source: AGHT+IG1+LHQjPyOyGTBjlOFOCBiVFWGLsM9DXctLy7KLtM8G+JerppUfSfUx/re6nDS5CF/WEkpgg== X-Received: by 2002:a50:c04d:0:b0:572:1fb7:2a77 with SMTP id u13-20020a50c04d000000b005721fb72a77mr2600433edd.6.1714747425412; Fri, 03 May 2024 07:43:45 -0700 (PDT) Received: from localhost.localdomain ([95.90.235.164]) by smtp.gmail.com with ESMTPSA id en18-20020a056402529200b005721b7bfea2sm1731017edb.22.2024.05.03.07.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 07:43:45 -0700 (PDT) From: Ninette Adhikari To: openembedded-core@lists.openembedded.org Cc: richard.purdie@linuxfoundation.org, randy.macleod@windriver.com, engineering@neighbourhood.ie, Ninette Adhikari <13760198+ninetteadhikari@users.noreply.github.com> Subject: [PATCH v2 1/5] oe-build-perf-report: Add apache echarts to make report interactive Date: Fri, 3 May 2024 16:43:36 +0200 Message-ID: <20240503144340.27385-2-ninette@thehoodiefirm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240503144340.27385-1-ninette@thehoodiefirm.com> References: <5e46a5c002cc62e0da9f3053c890120eb4582820.camel@linuxfoundation.org> <20240503144340.27385-1-ninette@thehoodiefirm.com> Reply-To: engineering@neighbourhood.ie MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 03 May 2024 14:43:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/198997 From: Ninette Adhikari <13760198+ninetteadhikari@users.noreply.github.com> - Add Apache echarts (https://echarts.apache.org/en/index.html) library to create build performance charts. - Restructure data to time and value array format so that it can be used by echarts. - This commit also converts test duration to minutes to map against the values axis. - Zoom is added to the line charts. --- .../build_perf/html/measurement_chart.html | 116 +++++++++++------- scripts/lib/build_perf/html/report.html | 6 +- 2 files changed, 72 insertions(+), 50 deletions(-) diff --git a/scripts/lib/build_perf/html/measurement_chart.html b/scripts/lib/build_perf/html/measurement_chart.html index 65f1a227ad..ffec3d09db 100644 --- a/scripts/lib/build_perf/html/measurement_chart.html +++ b/scripts/lib/build_perf/html/measurement_chart.html @@ -1,50 +1,76 @@ - diff --git a/scripts/lib/build_perf/html/report.html b/scripts/lib/build_perf/html/report.html index d1ba6f2578..653fd985bc 100644 --- a/scripts/lib/build_perf/html/report.html +++ b/scripts/lib/build_perf/html/report.html @@ -3,11 +3,7 @@ {# Scripts, for visualization#} - - + {# Render measurement result charts #} {% for test in test_data %} From patchwork Fri May 3 14:43:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ninette Adhikari X-Patchwork-Id: 43245 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC427C25B5C for ; Fri, 3 May 2024 14:43:49 +0000 (UTC) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by mx.groups.io with SMTP id smtpd.web10.14701.1714747428129034050 for ; Fri, 03 May 2024 07:43:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@thehoodiefirm-com.20230601.gappssmtp.com header.s=20230601 header.b=Jf+/o7d0; spf=neutral (domain: thehoodiefirm.com, ip: 209.85.218.44, mailfrom: ninette@thehoodiefirm.com) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a5200202c1bso1402045766b.0 for ; Fri, 03 May 2024 07:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thehoodiefirm-com.20230601.gappssmtp.com; s=20230601; t=1714747426; x=1715352226; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=laU5DtLkGDZTFTKvvaITQ8cXBDzM9hQQPvEygWw3MYc=; b=Jf+/o7d0N9Mksl9f6zmIvYd9BSSReeTrmSPjjgJlDVxOpCl21oM26dkw73dWrQrUGP XHFryWmtSO46QcixhK9UrSyO7/ciUXvMpBxmGtr8h5vCYXH3gwB0SN5K+t5Joi0PeuWs Jj6SOybJrnknCDWW0SagGFE4Aug7WEFGsYwmloMooUKtRj2ISmnlSCom44AOEK0W+K11 p3Pmgt7UmSk4jHSpFqkxceAbcUjjhrGMHPrkmmo/LW6ITpx4CloPpL+bCpPHwq4RvUoN YgQviTogA9ALA4gaNrGyW7ZNDfCyQXNtb19I8SYO+jBhuEJznjXNagH53vjn3XYmaTv2 okKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714747426; x=1715352226; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=laU5DtLkGDZTFTKvvaITQ8cXBDzM9hQQPvEygWw3MYc=; b=Hm5qEH4QhbFTitnXhTWasaszAtnaBPyEBk3OlCeETykwAf1pN+Z3np9O+qYblwiA/l Cmw3UtUQFtAzWoKxUT7JOIBA7c+0SbTfAaW353uAuEhFFS2SzGLX1FcpidKqpMZ8pSq2 eA1AAj7FqddEplZiac334jaaeoNNoYth2aLJRwbiSVpAOdbtXvfBkiaydW4npiQiq0YE b8pCM9NwKWyn2ttpI+yzEpoax2wuYlYAXEk4vMm3wAKotyohzIRwDW/qZnj83B1U1l+g uKAcg/37efO1EZNcfe0ssmNS6Ygar5sUxwJQoyEZHljjMT+5DgPjzcH+xvme29jmGY4y d1UA== X-Gm-Message-State: AOJu0YxSd9LAcjed30IIuD+8Nsi5eih9zQUY47/9PKPrV8FB2Nkh2noL +zpPY09xOtZzIRnx5CdZtDljdf4aomyyblCTY4+8tc99bW2Ug9zwhJdOTh46kpPtQipw73RPP+D v6FM= X-Google-Smtp-Source: AGHT+IHdhyMMN1lJHUFTOJrYhuRYpOQ/s3loDzMQ9d0hgDGlkSH70vqZlfxNSDFQSdLaiZan0JCtzg== X-Received: by 2002:a50:c003:0:b0:572:7c13:c7d8 with SMTP id r3-20020a50c003000000b005727c13c7d8mr2029029edb.34.1714747426692; Fri, 03 May 2024 07:43:46 -0700 (PDT) Received: from localhost.localdomain ([95.90.235.164]) by smtp.gmail.com with ESMTPSA id en18-20020a056402529200b005721b7bfea2sm1731017edb.22.2024.05.03.07.43.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 07:43:46 -0700 (PDT) From: Ninette Adhikari To: openembedded-core@lists.openembedded.org Cc: richard.purdie@linuxfoundation.org, randy.macleod@windriver.com, engineering@neighbourhood.ie, Ninette Adhikari <13760198+ninetteadhikari@users.noreply.github.com> Subject: [PATCH v2 2/5] oe-build-perf-report: Display more than 300 commits and date instead of commit number Date: Fri, 3 May 2024 16:43:37 +0200 Message-ID: <20240503144340.27385-3-ninette@thehoodiefirm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240503144340.27385-1-ninette@thehoodiefirm.com> References: <5e46a5c002cc62e0da9f3053c890120eb4582820.camel@linuxfoundation.org> <20240503144340.27385-1-ninette@thehoodiefirm.com> Reply-To: engineering@neighbourhood.ie MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 03 May 2024 14:43:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/198998 From: Ninette Adhikari <13760198+ninetteadhikari@users.noreply.github.com> - This commit updates measurement statistics data to include start_time so that time can be displayed instead of commit numbers on the chart. - It also updates default commit history length to 300. --- scripts/lib/build_perf/report.py | 4 +++- scripts/oe-build-perf-report | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/lib/build_perf/report.py b/scripts/lib/build_perf/report.py index ab77424cc7..82c56830d7 100644 --- a/scripts/lib/build_perf/report.py +++ b/scripts/lib/build_perf/report.py @@ -294,7 +294,7 @@ class SizeVal(MeasurementVal): return "null" return self / 1024 -def measurement_stats(meas, prefix=''): +def measurement_stats(meas, prefix='', time=0): """Get statistics of a measurement""" if not meas: return {prefix + 'sample_cnt': 0, @@ -319,6 +319,7 @@ def measurement_stats(meas, prefix=''): stats['quantity'] = val_cls.quantity stats[prefix + 'sample_cnt'] = len(values) + start_time = time # Add start time for both type sysres and disk usage mean_val = val_cls(mean(values)) min_val = val_cls(min(values)) max_val = val_cls(max(values)) @@ -334,6 +335,7 @@ def measurement_stats(meas, prefix=''): stats[prefix + 'max'] = max_val stats[prefix + 'minus'] = val_cls(mean_val - min_val) stats[prefix + 'plus'] = val_cls(max_val - mean_val) + stats[prefix + 'start_time'] = start_time return stats diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report index 7812ea4540..266700d294 100755 --- a/scripts/oe-build-perf-report +++ b/scripts/oe-build-perf-report @@ -336,7 +336,9 @@ def print_html_report(data, id_comp, buildstats): test_i = test_data['tests'][test] meas_i = test_i['measurements'][meas] commit_num = get_data_item(meta, 'layers.meta.commit_count') - samples.append(measurement_stats(meas_i)) + # Add start_time for both test measurement types of sysres and disk usage + start_time = test_i['start_time'][0] + samples.append(measurement_stats(meas_i, '', start_time)) samples[-1]['commit_num'] = commit_num absdiff = samples[-1]['val_cls'](samples[-1]['mean'] - samples[id_comp]['mean']) @@ -473,7 +475,7 @@ Examine build performance test results from a Git repository""" group.add_argument('--branch', '-B', default='master', help="Branch to find commit in") group.add_argument('--branch2', help="Branch to find comparision revisions in") group.add_argument('--machine', default='qemux86') - group.add_argument('--history-length', default=25, type=int, + group.add_argument('--history-length', default=300, type=int, help="Number of tested revisions to plot in html report") group.add_argument('--commit', help="Revision to search for") From patchwork Fri May 3 14:43:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ninette Adhikari X-Patchwork-Id: 43248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B354DC25B10 for ; Fri, 3 May 2024 14:43:59 +0000 (UTC) Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by mx.groups.io with SMTP id smtpd.web11.14884.1714747429950325803 for ; Fri, 03 May 2024 07:43:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@thehoodiefirm-com.20230601.gappssmtp.com header.s=20230601 header.b=EXreHAtu; spf=neutral (domain: thehoodiefirm.com, ip: 209.85.218.41, mailfrom: ninette@thehoodiefirm.com) Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a599fcba36eso29844766b.0 for ; Fri, 03 May 2024 07:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thehoodiefirm-com.20230601.gappssmtp.com; s=20230601; t=1714747428; x=1715352228; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=NcjRLJb+gfaXEcPsgYY3Wn04xI139fk1K1+WC3Z6xjs=; b=EXreHAtuEs/dnQ7IWRkFqzup1ACtezTB4OpM6v9ee79JQaYtBkVuZs8qxfCFOdvrMH 72JGcvkLnRqOraxCP4H26RY6+NUuW9cO1VY/QbIjfGRu95PkQS6EolJ1SDIqjRR2PPkE vOUgAgDbHP1t4GrzIVU6Pf80bAiziseyQG/0z5zv7C5GpFa8qu3OZ/T7ZOb60Ek7XkRX B+fe8o+cCNx2AkAW2H9UWvDzJUJASjPniaJ9pdikUBf+jTnWZKmh35DcIx5pqr2nqjTc 3omwa1kRPYolVd5jNpQ5B39DXtQHurS+P5eIv5tbG7YHtYeEp1mmIVK96+6B+yUi9EFW FBow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714747428; x=1715352228; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=NcjRLJb+gfaXEcPsgYY3Wn04xI139fk1K1+WC3Z6xjs=; b=Nt9bVnqgTRX+FvU1bNak9oC6nf97JMTQohtxSqmaqe4sz7YV2gGciNnmM3LFmkVjJq ilcXmwHrYWd9UberY3qkecN/WWYXg7vX5Gz90i/cyxwVmlJ02+F+L6r34BuNDUMiT90D j3sjpTWTiC2oB9oMWNbcZvQ/zRKCXB8l8cq+Ag8LIYyViP4+n+iRYMIHOL0Eqw45rhZm +5P6Qb2VKcub5vg+JskBiV4osDBboN1+fgBPiKyfcBjRk14RC+qByKGBuZjtcRCa4yb9 EfyTh2qJMZVeuyAf5figalqhQKEVghlu0P2hWIIE3eG0dI+zkI0I6aVte3ULLBX/SxOG 9E/A== X-Gm-Message-State: AOJu0Yy11xlPnRRmPvLJWagy8ugiE1SRYFWv6TDdBpQbvHsPaW9h5WxF QPY9nUt3kK3d9vak+V7kbRJzz8F5VfYebi+Hb45xp4MilyKXz6umHHIxR0wLFHgzaj108pU4atv ySfA= X-Google-Smtp-Source: AGHT+IGuVnmqrnJwc1N8DYy4ME9l9DMeAXjqyffWeTtynHOE6R8/cIi+ECGm+bwuey5f/wBIy8fW3g== X-Received: by 2002:a50:8e53:0:b0:570:db4:e5cd with SMTP id 19-20020a508e53000000b005700db4e5cdmr1626724edx.34.1714747428114; Fri, 03 May 2024 07:43:48 -0700 (PDT) Received: from localhost.localdomain ([95.90.235.164]) by smtp.gmail.com with ESMTPSA id en18-20020a056402529200b005721b7bfea2sm1731017edb.22.2024.05.03.07.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 07:43:47 -0700 (PDT) From: Ninette Adhikari To: openembedded-core@lists.openembedded.org Cc: richard.purdie@linuxfoundation.org, randy.macleod@windriver.com, engineering@neighbourhood.ie, Ninette Adhikari <13760198+ninetteadhikari@users.noreply.github.com> Subject: [PATCH v2 3/5] oe-build-perf-report: Improve report styling and add descriptions Date: Fri, 3 May 2024 16:43:38 +0200 Message-ID: <20240503144340.27385-4-ninette@thehoodiefirm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240503144340.27385-1-ninette@thehoodiefirm.com> References: <5e46a5c002cc62e0da9f3053c890120eb4582820.camel@linuxfoundation.org> <20240503144340.27385-1-ninette@thehoodiefirm.com> Reply-To: engineering@neighbourhood.ie MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 03 May 2024 14:43:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/198999 From: Ninette Adhikari <13760198+ninetteadhikari@users.noreply.github.com> Styling updates are added including page margin, labels for x and y axis, tooltip, and section descriptions. --- .../build_perf/html/measurement_chart.html | 28 +++--- scripts/lib/build_perf/html/report.html | 90 +++++++++++++------ scripts/lib/build_perf/report.py | 3 +- 3 files changed, 80 insertions(+), 41 deletions(-) diff --git a/scripts/lib/build_perf/html/measurement_chart.html b/scripts/lib/build_perf/html/measurement_chart.html index ffec3d09db..9acb3785e2 100644 --- a/scripts/lib/build_perf/html/measurement_chart.html +++ b/scripts/lib/build_perf/html/measurement_chart.html @@ -13,8 +13,10 @@ // Convert raw data to the format: [time, value] const data = rawData.map(([commit, value, time]) => { return [ - new Date(time * 1000).getTime(), // The Date object takes values in milliseconds rather than seconds. So to use a Unix timestamp we have to multiply it by 1000. - Array.isArray(value) ? convertToMinute(value) : value // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds] + // The Date object takes values in milliseconds rather than seconds. So to use a Unix timestamp we have to multiply it by 1000. + new Date(time * 1000).getTime(), + // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds] + Array.isArray(value) ? convertToMinute(value) : value ] }); @@ -22,16 +24,18 @@ const option = { tooltip: { trigger: 'axis', - position: function (pt) { - return [pt[0], '10%']; - }, - valueFormatter: (value) => value.toFixed(2) + valueFormatter: (value) => { + const hours = Math.floor(value/60) + const minutes = Math.floor(value % 60) + const seconds = Math.floor((value * 60) % 60) + return hours + ':' + minutes + ':' + seconds + } }, xAxis: { type: 'time', }, yAxis: { - name: '{{ measurement.value_type.quantity }}' == 'time' ? 'Duration (minutes)' : 'Disk size (MB)', + name: '{{ measurement.value_type.quantity }}' == 'time' ? 'Duration in minutes' : 'Disk size in MB', type: 'value', min: function(value) { return Math.round(value.min - 0.5); @@ -42,14 +46,10 @@ }, dataZoom: [ { - type: 'inside', - start: 0, - end: 100 + type: 'slider', + xAxisIndex: 0, + filterMode: 'none' }, - { - start: 0, - end: 100 - } ], series: [ { diff --git a/scripts/lib/build_perf/html/report.html b/scripts/lib/build_perf/html/report.html index 653fd985bc..4cd240760a 100644 --- a/scripts/lib/build_perf/html/report.html +++ b/scripts/lib/build_perf/html/report.html @@ -24,23 +24,15 @@ text-align: left; border-collapse: collapse; } -.meta-table tr:nth-child(even){background-color: #f2f2f2} -meta-table th, .meta-table td { - padding: 4px; -} .summary { - margin: 0; font-size: 14px; text-align: left; border-collapse: collapse; } -summary th, .meta-table td { - padding: 4px; -} .measurement { padding: 8px 0px 8px 8px; border: 2px solid #f0f0f0; - margin-bottom: 10px; + margin: 1.5rem 0; } .details { margin: 0; @@ -60,18 +52,58 @@ summary th, .meta-table td { background-color: #f0f0f0; margin-left: 10px; } -hr { - color: #f0f0f0; +.card-container { + border-bottom-width: 1px; + padding: 1.25rem 3rem; + box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + border-radius: 0.25rem; +} +body { + font-family: 'Helvetica', sans-serif; + margin: 3rem 8rem; +} +h1 { + text-align: center; } h2 { - font-size: 20px; + font-size: 1.5rem; margin-bottom: 0px; color: #707070; + padding-top: 1.5rem; } h3 { - font-size: 16px; + font-size: 1.3rem; margin: 0px; color: #707070; + padding: 1.5rem 0; +} +h4 { + font-size: 14px; + font-weight: lighter; + line-height: 1.2rem; + margin: auto; + padding-top: 1rem; +} +table { + margin-top: 1.5rem; + line-height: 2rem; +} +tr { + border-bottom: 1px solid #e5e7eb; +} +tr:first-child { + border-bottom: 1px solid #9ca3af; +} +tr:last-child { + border-bottom: none; +} +a { + text-decoration: none; + font-weight: bold; + color: #0000EE; +} +a:hover { + color: #8080ff; } @@ -79,13 +111,14 @@ h3 { {% macro poky_link(commit) -%} - {{ commit[0:11] }} + {{ commit[0:11] }} {%- endmacro %} -
+
+

Performance Test Report

{# Test metadata #}

General

-
+

The table provides an overview of the comparison between two selected commits from the same branch.

@@ -108,19 +141,21 @@ h3 { {# Test result summary #}

Test result summary

-
+

The test summary presents a thorough breakdown of each test conducted on the branch, including details such as build time and disk space consumption. Additionally, it gives insights into the average time taken for test execution, along with absolute and relative values for a better understanding.

+ + + + + + + {% for test in test_data %} - {% if loop.index is even %} - {% set row_style = 'style="background-color: #f2f2f2"' %} - {% else %} - {% set row_style = 'style="background-color: #ffffff"' %} - {% endif %} {% if test.status == 'SUCCESS' %} {% for measurement in test.measurements %} {% if loop.index == 1 %} - + {% else %} {# add empty cell in place of the test name#} @@ -149,10 +184,12 @@ h3 {
Test nameMeasurement descriptionMean valueAbsolute differenceRelative difference
{{ test.name }}: {{ test.description }}{{ test.name }}: {{ test.description }}
{# Detailed test results #} +

Test details

+

The following section provides details of each test, accompanied by charts representing build time and disk usage over time or by commit number.

{% for test in test_data %} -

{{ test.name }}: {{ test.description }}

-
+

{{ test.name }}: {{ test.description }}

{% if test.status == 'SUCCESS' %} +
{% for measurement in test.measurements %}

{{ measurement.description }}

@@ -271,7 +308,8 @@ h3 { {% endif %} {% endif %}
- {% endfor %} + {% endfor %} +
{# Unsuccessful test #} {% else %} {{ test.status }} diff --git a/scripts/lib/build_perf/report.py b/scripts/lib/build_perf/report.py index 82c56830d7..f4e6a92e09 100644 --- a/scripts/lib/build_perf/report.py +++ b/scripts/lib/build_perf/report.py @@ -319,7 +319,8 @@ def measurement_stats(meas, prefix='', time=0): stats['quantity'] = val_cls.quantity stats[prefix + 'sample_cnt'] = len(values) - start_time = time # Add start time for both type sysres and disk usage + # Add start time for both type sysres and disk usage + start_time = time mean_val = val_cls(mean(values)) min_val = val_cls(min(values)) max_val = val_cls(max(values)) From patchwork Fri May 3 14:43:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ninette Adhikari X-Patchwork-Id: 43246 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3580C41513 for ; Fri, 3 May 2024 14:43:59 +0000 (UTC) Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by mx.groups.io with SMTP id smtpd.web11.14885.1714747430919500650 for ; Fri, 03 May 2024 07:43:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@thehoodiefirm-com.20230601.gappssmtp.com header.s=20230601 header.b=uE6RtzWU; spf=neutral (domain: thehoodiefirm.com, ip: 209.85.218.41, mailfrom: ninette@thehoodiefirm.com) Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a595199cb9bso492040666b.3 for ; Fri, 03 May 2024 07:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thehoodiefirm-com.20230601.gappssmtp.com; s=20230601; t=1714747429; x=1715352229; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=yc5VQSFptfXAKtZw1flQE4ob7d1CsnhF/ViiQcx8wJM=; b=uE6RtzWU4EBG6pDoO34gnNnBd0UcfAWF73d7FbHklgRXvNUemNfMX6YwR8RK6c6hIj a06ZUnzoPyKKwDA1nbcGKABQXx5qfFMQkEsDBpXr0LPYivYKXPHliBpWBushmfsGWyoG UDb+Q2DDucbB62OReqzP8m/sAag+W4EDBn9dSaNbv5Q+o/yoJznM14SaVkVXtOx5Zy0K QmcDoG8bm4TtpQz9Vl/CgrRCOx9DP2vZGZlo/wLzgRbqg4mjUElp7QyB/Og1IF0JwYf9 xKnAdkFmgEcNXESNbclh3JkkxhvIDq7mIcBqaA673bOLQXZ/dRWpY0WQcuqPzN4KB4D1 2DRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714747429; x=1715352229; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=yc5VQSFptfXAKtZw1flQE4ob7d1CsnhF/ViiQcx8wJM=; b=Q1fH/Hbxyt0jv8piDO+GaO2G0/Bgs+vU3udYABb2TQbkW/mjEALsTmmbXP7y44Poo+ yih2ZfZt2nZX+4tfOVher+i92TEwB/yOQEcjGHR74eQlCe2FKyaKiTmitkLa9FWM26hM rPB5MlYKVcKwD+3JhDgdRwlqQBDiIstFLW7t/Xi4vXK2O9mAl1OuMjtppXEa69qTtQ6B ln3ZtQ15P/Jx9D/fIRF4X59vh8OkLArvfv1u/OrieqiilG6qps3LeEKrrCoDzgpret7n 142VirWPKdpUh7/F5TLbnTW3oCDdo3ybTUKHm3NeBirc2/fxr50dF7QupNdExcYIWvx2 Si5w== X-Gm-Message-State: AOJu0YzPe8od9YbcVwMI+SAbfnkV7AEPPHng/MQl2ca4yzM6Fa58VJUB 0DFcFFpdg83YCbLWv8PJtXu/iBHmF5SXdENB9qlp+xAex7R7swm9rplh3DjAxCAvsPH+WRomhS7 /xPs= X-Google-Smtp-Source: AGHT+IE04TQNrIXFfvgI8F30xWnAV13S6FjqqpmjPZTVrE4+Cg4kXqsXBTcaHwrGc90sC/q6pXH5/g== X-Received: by 2002:a50:d4d5:0:b0:56a:ae8a:acc0 with SMTP id e21-20020a50d4d5000000b0056aae8aacc0mr1610059edj.21.1714747429442; Fri, 03 May 2024 07:43:49 -0700 (PDT) Received: from localhost.localdomain ([95.90.235.164]) by smtp.gmail.com with ESMTPSA id en18-20020a056402529200b005721b7bfea2sm1731017edb.22.2024.05.03.07.43.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 07:43:49 -0700 (PDT) From: Ninette Adhikari To: openembedded-core@lists.openembedded.org Cc: richard.purdie@linuxfoundation.org, randy.macleod@windriver.com, engineering@neighbourhood.ie, Ninette Adhikari Subject: [PATCH v2 4/5] oe-build-perf-report: Update chart tooltip and chart type Date: Fri, 3 May 2024 16:43:39 +0200 Message-ID: <20240503144340.27385-5-ninette@thehoodiefirm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240503144340.27385-1-ninette@thehoodiefirm.com> References: <5e46a5c002cc62e0da9f3053c890120eb4582820.camel@linuxfoundation.org> <20240503144340.27385-1-ninette@thehoodiefirm.com> Reply-To: engineering@neighbourhood.ie MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 03 May 2024 14:43:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/199000 - Update chart tooltip format to show value as size in MB for 'rootfs size' and timestamp for 'tmpdir size' - Add commit number to tooltip - Update chart type to 'step chart' instead of 'line chart' Signed-off-by: Ninette Adhikari --- .../build_perf/html/measurement_chart.html | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/scripts/lib/build_perf/html/measurement_chart.html b/scripts/lib/build_perf/html/measurement_chart.html index 9acb3785e2..7982ec39c2 100644 --- a/scripts/lib/build_perf/html/measurement_chart.html +++ b/scripts/lib/build_perf/html/measurement_chart.html @@ -10,13 +10,19 @@ return time[0]*60 + time[1] + time[2]/60 + time[3]/3600; } + // Update value format to either minutes or leave as size value + const updateValue = (value) => { + // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds] + return Array.isArray(value) ? convertToMinute(value) : value + } + // Convert raw data to the format: [time, value] const data = rawData.map(([commit, value, time]) => { return [ // The Date object takes values in milliseconds rather than seconds. So to use a Unix timestamp we have to multiply it by 1000. new Date(time * 1000).getTime(), // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds] - Array.isArray(value) ? convertToMinute(value) : value + updateValue(value) ] }); @@ -25,11 +31,22 @@ tooltip: { trigger: 'axis', valueFormatter: (value) => { - const hours = Math.floor(value/60) - const minutes = Math.floor(value % 60) - const seconds = Math.floor((value * 60) % 60) - return hours + ':' + minutes + ':' + seconds - } + const commitNumber = rawData.filter(([commit, dataValue, time]) => updateValue(dataValue) === value) + if ('{{ measurement.value_type.quantity }}' == 'time') { + const hours = Math.floor(value/60) + const minutes = Math.floor(value % 60) + const seconds = Math.floor((value * 60) % 60) + return [ + hours + ':' + minutes + ':' + seconds + ', ' + + 'commit number: ' + commitNumber[0][0] + ] + } + return [ + value.toFixed(2) + ' MB' + ', ' + + 'commit number: ' + commitNumber[0][0] + ] + }, + }, xAxis: { type: 'time', @@ -55,7 +72,7 @@ { name: '{{ measurement.value_type.quantity }}', type: 'line', - smooth: true, + step: 'start', symbol: 'none', data: data } From patchwork Fri May 3 14:43:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ninette Adhikari X-Patchwork-Id: 43247 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0868C10F16 for ; Fri, 3 May 2024 14:43:59 +0000 (UTC) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by mx.groups.io with SMTP id smtpd.web11.14886.1714747432597547145 for ; Fri, 03 May 2024 07:43:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@thehoodiefirm-com.20230601.gappssmtp.com header.s=20230601 header.b=iNkQ2+JK; spf=neutral (domain: thehoodiefirm.com, ip: 209.85.218.47, mailfrom: ninette@thehoodiefirm.com) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a59954c1271so176846566b.3 for ; Fri, 03 May 2024 07:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thehoodiefirm-com.20230601.gappssmtp.com; s=20230601; t=1714747431; x=1715352231; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=PNSHEHa+eW1MSML8KrgIDh/1Sclxk6gfqHJWlFa8hK8=; b=iNkQ2+JKabcEknWsyQPLAMbOf0mdvF6HC9pNk2u1n1Vs+xLZt6L8xwCaMdn+6Levbv 7DzX8Q8/a7L+5jAngzJIaUL2roPz/JuMyTvqckInuFh3gFkVvt/2irwYo/8/gNEd9tyx o7/1DXBf9Y2k976QL0JCFXUuUWK86vRGMchA6wSKc0+z8D8B+0hqIqksIAS0oD1Egyzz HFkOBU11XY56nzmfLrYTQgwWUOepoPdd2RQfPM0n+jzmGRIazpNQ89n3BFlsDNStZg1s mQBqHKbcMH1qpjlchChBl1a2q6hqlA9FlRS3CrMQ+CymDpwr92g2SrV9iYqovmBfJcih Yosw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714747431; x=1715352231; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PNSHEHa+eW1MSML8KrgIDh/1Sclxk6gfqHJWlFa8hK8=; b=o/rJLJM8MrIP2t8zK5yOkL8qcZ55VrYrdLJrCiyAjHQxRxGF93EPZuwoO0rEtPSCbP /Dts/Cn/jH8zM6FKuTmvEzTcZeNv5A5bNGkl1jytEP8dIEJxl/Awa434WKJkDUGXEtyr NKfNvDz0YBeCJoz1l3GhIY+zb3BoeT5fy887uGc+GhwJ4Rqc1JPoRwuvygjAfxQOILcP /BpqCv/igeINS6jNMMnhkyT/SwD3CGh7gzwq9pqmien4u9bKgUoUv46n8Zyi7rxXpsPE RPyMc6CC3mX50bpc4HcZFhMczmtO93G71GAvAkNbREQb0GB3ts9O5FWdK0CXLQ4g8qMP Ks0Q== X-Gm-Message-State: AOJu0YxenKjS7JwVOXWtXzCrc2RkB8J3jr+VY2A2ijHCVstqRP+ukkK5 ipLU6TZts9OXJ4VH9qQuVeDhqvBaZGqoGxqzODz7kMjDPOQRmQV6ZDTKh56BDRozzyUx10hrvdB Jivg= X-Google-Smtp-Source: AGHT+IFiOA9gBM9w0QqQrzS+Wq8G6TNFqT+mB3tyQnjn88Oid45wv2P0EuMnPh7EUXWGP1QsvB9OnQ== X-Received: by 2002:a50:8a96:0:b0:56d:fdb3:bcc5 with SMTP id j22-20020a508a96000000b0056dfdb3bcc5mr1740720edj.12.1714747431126; Fri, 03 May 2024 07:43:51 -0700 (PDT) Received: from localhost.localdomain ([95.90.235.164]) by smtp.gmail.com with ESMTPSA id en18-20020a056402529200b005721b7bfea2sm1731017edb.22.2024.05.03.07.43.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 07:43:50 -0700 (PDT) From: Ninette Adhikari To: openembedded-core@lists.openembedded.org Cc: richard.purdie@linuxfoundation.org, randy.macleod@windriver.com, engineering@neighbourhood.ie, Ninette Adhikari Subject: [PATCH v2 5/5] oe-build-perf-report: Add dark mode Date: Fri, 3 May 2024 16:43:40 +0200 Message-ID: <20240503144340.27385-6-ninette@thehoodiefirm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240503144340.27385-1-ninette@thehoodiefirm.com> References: <5e46a5c002cc62e0da9f3053c890120eb4582820.camel@linuxfoundation.org> <20240503144340.27385-1-ninette@thehoodiefirm.com> Reply-To: engineering@neighbourhood.ie MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 03 May 2024 14:43:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/199001 Update css to add dark mode when window prefers-color-scheme is dark. Signed-off-by: Ninette Adhikari --- .../build_perf/html/measurement_chart.html | 15 +++++--- scripts/lib/build_perf/html/report.html | 34 +++++++++++++++---- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/scripts/lib/build_perf/html/measurement_chart.html b/scripts/lib/build_perf/html/measurement_chart.html index 7982ec39c2..ad4a93ed02 100644 --- a/scripts/lib/build_perf/html/measurement_chart.html +++ b/scripts/lib/build_perf/html/measurement_chart.html @@ -81,13 +81,20 @@ // Draw chart const chart_div = document.getElementById('{{ chart_elem_id }}'); - const measurement_chart= echarts.init(chart_div, null, { - height: 320 - }); + // Set dark mode + let measurement_chart + if (window.matchMedia('(prefers-color-scheme: dark)').matches) { + measurement_chart= echarts.init(chart_div, 'dark', { + height: 320 + }); + } else { + measurement_chart= echarts.init(chart_div, null, { + height: 320 + }); + } // Change chart size with browser resize window.addEventListener('resize', function() { measurement_chart.resize(); }); measurement_chart.setOption(option); - diff --git a/scripts/lib/build_perf/html/report.html b/scripts/lib/build_perf/html/report.html index 4cd240760a..537ed3ee52 100644 --- a/scripts/lib/build_perf/html/report.html +++ b/scripts/lib/build_perf/html/report.html @@ -19,6 +19,15 @@ {# Styles #} {{ title }}