From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7323090957517193216 X-Received: by 2002:a7b:c318:0:b0:40e:4ee3:2459 with SMTP id k24-20020a7bc318000000b0040e4ee32459mr223392wmj.347.1705039981844; Thu, 11 Jan 2024 22:13:01 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:548c:b0:40e:62d2:6dd7 with SMTP id iv12-20020a05600c548c00b0040e62d26dd7ls406890wmb.0.-pod-prod-05-eu; Thu, 11 Jan 2024 22:13:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4ev5kVv5Drm/bWUWJklm8ZJh+dauoLKaCPd90AuM0xVGFkIHUCp02xaTR+LfmBcPuNQ0X X-Received: by 2002:a05:600c:34d5:b0:40e:490e:8e7b with SMTP id d21-20020a05600c34d500b0040e490e8e7bmr582438wmq.127.1705039979617; Thu, 11 Jan 2024 22:12:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705039979; cv=none; d=google.com; s=arc-20160816; b=EOeqXkde6jvCX8ObUcCSKvSMmveBYP/ypXe3GkLPdF2yX5xcu6xms5nWv8QTOPvfVp R/NLwTUUCn/cFc/dIvvBheGERzXZ/5831SKhHPUKJVk74ObSg/0HK8owqg7dfFElcbcj 4o2uIsBW2N+0GFhziP1FLPbTHStS8xCKPc4GpgRKa63WUeOXZqT/iGcXnkOzT8BILVmx 4yvJsTnlDqaMLIqakFGJuhWjCzDZHs5a06z/HOHaNtDQrZBa0TlBrpAOjOwiDmuOBzRU nPDTD0Xyw9lJRy/q9Hq6RQod3oDDBXly/6PU38kQ++YCCnZYIIub3KCYZtz3Sm5pL0pc C4MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=aeGabEbV5jwNBmm/u2fwjHei1VbitI/1hk5H6w1VYj4=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=rNDvCmUB2nARjdRyr5WweiBRNz1sn/nm/cxjRsxEP0abNp58ZSMMBnvWsLcPPMizD3 lRVTJo+39LNqOPg/KNm2EVoIETRm4RhRJLbDyK8FoBYkJraGo8ll4No9lqGl8gBfLHia uhQBwMLq12jO66s53AD8DLs29eIfgD8XfY3q+et3n4RXcrLtOshtP3aF/lZ/hyp1yyt4 NwknndSJf/nbM1dWkzIfiyZ7T7ggFS49w6TPb13kcrnEO06w1OUn8ddm48NIzuhhYTW9 Zqe1I/M/OYk2Z2Zh+YO5BWEqsSbqh8ghxPB9czLXzLJNV0bwXzTwqpAh0DLwZ+BNIOxv z9CA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id p19-20020a05600c1d9300b0040e6467f543si28912wms.0.2024.01.11.22.12.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Jan 2024 22:12:59 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 40C6CvqS005370 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 12 Jan 2024 07:12:58 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH 1/5] buildstats: Sync code base with openembedded-core 2022-04.15 Date: Fri, 12 Jan 2024 07:12:53 +0100 Message-Id: <20240112061257.22241-2-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240112061257.22241-1-ubely@ilbers.de> References: <20240112061257.22241-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: ILxvPuO0XAqc This just syncs buildstats related stuff with recent tag in LTS 'kirkstone' branch of OE core. Corresponds to OE commit eea685e1caaf. Signed-off-by: Uladzimir Bely --- meta/lib/buildstats.py | 4 ++-- scripts/pybootchartgui/pybootchartgui/draw.py | 10 +++++++++- scripts/pybootchartgui/pybootchartgui/parsing.py | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py index 8627ed3c..c52b6c3b 100644 --- a/meta/lib/buildstats.py +++ b/meta/lib/buildstats.py @@ -43,8 +43,8 @@ class SystemStats: # depends on the heartbeat event, which fires less often. self.min_seconds = 1 - self.meminfo_regex = re.compile(b'^(MemTotal|MemFree|Buffers|Cached|SwapTotal|SwapFree):\s*(\d+)') - self.diskstats_regex = re.compile(b'^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$') + self.meminfo_regex = re.compile(rb'^(MemTotal|MemFree|Buffers|Cached|SwapTotal|SwapFree):\s*(\d+)') + self.diskstats_regex = re.compile(rb'^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$') self.diskstats_ltime = None self.diskstats_data = None self.stat_ltimes = None diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py index 29eb7505..707e7fe4 100644 --- a/scripts/pybootchartgui/pybootchartgui/draw.py +++ b/scripts/pybootchartgui/pybootchartgui/draw.py @@ -267,7 +267,10 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range): # avoid divide by zero if max_y == 0: max_y = 1.0 - xscale = float (chart_bounds[2]) / (max_x - x_shift) + if (max_x - x_shift): + xscale = float (chart_bounds[2]) / (max_x - x_shift) + else: + xscale = float (chart_bounds[2]) # If data_range is given, scale the chart so that the value range in # data_range matches the chart bounds exactly. # Otherwise, scale so that the actual data matches the chart bounds. @@ -555,6 +558,11 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w): draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h)) draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, proc_h) + + # Show elapsed time for each task + elapsed_time = f"{trace.processes[process][1] - start}s" + draw_text(ctx, elapsed_time, PROC_TEXT_COLOR, x + w + 4, y + proc_h - 4) + y = y + proc_h return curr_y diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py index b42dac6b..9d6787ec 100644 --- a/scripts/pybootchartgui/pybootchartgui/parsing.py +++ b/scripts/pybootchartgui/pybootchartgui/parsing.py @@ -128,7 +128,7 @@ class Trace: def compile(self, writer): def find_parent_id_for(pid): - if pid is 0: + if pid == 0: return 0 ppid = self.parent_map.get(pid) if ppid: -- 2.20.1