summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui
AgeCommit message (Collapse)Author
2023-09-09pybootchartgui: also match do_compile and do_configure subtasksJose Quaresma
This will match other deviation subtask of the same main task, a couple of them can be found on oe-core layer: do_compile_kernelmodules do_compile_ptest cmake_do_configure setuptools3_do_configure cargo_common_do_configure python_pyo3_do_configure python_setuptools3_rust_do_configure This task will be also painted with the same color of the main task but using alpha blending. Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14pybootchartgui: fix width max usage in draw_label_in_boxJose Quaresma
The function draw_label_in_box chooses the correct side based on the maximum width length argument 'maxx'. Currently the labels are always drawn on the left side and this is because we are inadvertently passing the 'maxx' argument wrong. Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14pybootchartgui: fix overlapping argument in render_processes_chartJose Quaresma
There is another variable named 'w' on the function which is redefined. The full width is needed in the function so rename it as this must be unique. Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14pybootchartgui: concatenate the elapsed time with the processJose Quaresma
The function draw_label_in_box have logic to chose the rigth side to call the draw_text, so use it instaed of forcing the cordinates of the right side. Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14pybootchartgui: calcule elapsed_time when starting the loopJose Quaresma
Instaed of calculate the elapsed time over the loop when needed do it on the loop startup. Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-31pybootchartgui: show elapsed time for each taskMauro Queiros
Currently, finding the elapsed time of each task in buildtimes.svg is a manual effort of checking the top axis and finding and subtracting the end and start time of the task. This change adds the elapsed time for each task, so that manual effort of comparing start/end time is avoided. Signed-off-by: Mauro Queiros <Mauro.Queiros@criticaltechworks.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-16pybootchart: Fix extents handling to account for cpu/io/mem pressure changesRichard Purdie
The previous addition of pressure values to the chart didn't fix the extents function which meant the bottom of the chart was cut off. Fix that. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-16pybootchartui: Fix python syntax issueRichard Purdie
Fix: scripts/pybootchartgui/pybootchartgui/parsing.py:134: SyntaxWarning: "is" with a literal. Did you mean "=="? if pid is 0: Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-04pybootchartgui: write the max values in the graph legendMartin Jansa
* easier to find than searching for the highest value in the graph, when the graph is really wide Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2022-08-04pybootchartgui: fix 2 SyntaxWarningsMartin Jansa
scripts/pybootchartgui/pybootchartgui/draw.py:820: SyntaxWarning: "is not" with a literal. Did you mean "!="? if (OPTIONS.show_pid or OPTIONS.show_all) and ipid is not 0: scripts/pybootchartgui/pybootchartgui/draw.py:918: SyntaxWarning: "is not" with a literal. Did you mean "!="? if i is not 0: Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2022-08-04pybootchartgui: render memory pressure as wellMartin Jansa
* memory pressure is already collected in buildstats, render it as well when available Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2022-06-29pybootchartgui: render cpu and io pressureAryaman Gupta
Add two new, separate charts showing the avg10 and delta total pressure over time for the CPU and IO resources. The height of the avg10 data in each chart represents the percentage of time "some" task was delayed over the specific resource during the last 10 seconds of the build. The height of the delta total data in each chart represents the total time "some" task was delayed since the last sample was collected. If the reduced_proc_pressure data is not present in the buildstats log, then the new charts are not shown at all rather than being present but unpopulated. Note that the delta total graphs may appear "spikey", oscillating from high values to low. This behaviour is fixed in a subsequent commit. Signed-off-by: Aryaman Gupta <aryaman.gupta@windriver.com> Signed-off-by: Randy MacLeod <randy.macleod@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-21pybootchart: Avoid divide by zeroRichard Purdie
Avoid a rare divide by zero error if there isn't data point spread. [YOCTO #14547] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-02pybootchart/draw: Avoid divide by zero errorRichard Purdie
When disk stats don't run frequenctly enough, we see divide by zero errors. The code already has a fallback path so ensure we use it for this case too. [YOCTO #14360] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-15scripts/pybootchartgui: Fix to work with python 3.8Richard Purdie
time.clock() was removed in python 3.8, use one of its recommended replacements to fix failures on python 3.8 systems. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-18fix various, innocuous typosRobert P. J. Day
Corrections: - environment - accommodate - conversion - compatible Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08scripts/pybootchart/draw: Fix some bounding problemsRichard Purdie
The chart size extents were being incorrectly reported, not accounting for the width of the legend. Set a minimum width to account for that (its fixed size). Also stop printing the chart background off the bottom of the chart extents. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08scripts/pybootchart/draw: Clarify some variable namesRichard Purdie
This tweaks some intermediate variable names to make it clearer what is being done. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08scripts/pybootchart: Port to python3Richard Purdie
This updates the pybootchart code (used for viewing build timing profiles) to use python3. The bulk of the changes are to use gi instead of pygtk, i.e. port from gtk+2 to gtk+3. The main change is to make the bootchart widget inherit gtk.Scrollable and change the way the scrollbars are implemented to match the new method upstream. The drawing code used cairo already so can remain unchanged, Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08scripts/pybootchart: Fix mixed indentationRichard Purdie
The script had a toxic mix of tabs and spaces, fix this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-07pybootchartgui: support reading reduced /proc logsPatrick Ohly
Pre-processing /proc data during the build considerably reduces the amount of data written to disk: 176KB instead of 4.7MB for a 20 minuted build. Parsing also becomes faster. buildstats.bbclass only writes the reduced logs now, but support for the full /proc files is kept around as reference. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-07pybootchartgui: simplify drawing of memory usagePatrick Ohly
The internal representation after parsing now matches exactly what the drawing code needs, thus speeding up drawing a bit. However, the main motivation is to store exactly that required information in a more compact file. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-07pybootchartgui: render disk space usagePatrick Ohly
This adds a new, separate chart showing the amount of disk space used over time for each volume monitored during the build. The hight of the graph entries represents the delta between current usage and minimal usage during the build. That's more useful than showing just the current usage, because then a graph showing changes in the order of MBs in a volume that is several GB large would be just flat. The legend shows the maximum of those deltas, i.e. maximum amount of space needed for the build. Minor caveat: sampling of disk space usage starts a bit later than the initial task, so the displayed value may be slightly lower than the actual amount of space needed because sampling does not record the actual initial state. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-07pybootchartgui/parsing.py: fix error handling in meminfo parserPatrick Ohly
When matching fails, m.group(0) is invalid and can't be used in the error message. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-07pybootchartgui/draw.py: skip empty CPU and disk usage chartsPatrick Ohly
The only real change is the addition of two if checks that skips the corresponding drawing code when there is no data. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-07pybootchartgui: show system utilizationPatrick Ohly
This enables rendering of the original bootchart charts for CPU, disk and memory usage. It depends on the /proc samples recorded by the updated buildstats.bbclass. Currently, empty charts CPU and disk usage charts are drawn if that data is not present; the memory chart already gets skipped when there's no data, which will also have to be added for the other two. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-07pybootchartgui/draw.py: fix drawing of samples not starting at zeroPatrick Ohly
The code did not handle x scaling correctly when drawing starts at some time larger than zero, i.e. it worked for normal bootchart data, but not for the system statistics recorded by buildstats.bbclass. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-07pybootchartgui/draw.py: allow moving process chart up and downPatrick Ohly
Substracting curr_y when determining the hight of the process chart is wrong because the height is independent of the position where the chart is about to be drawn. It happens to work at the moment because curr_y is always 10 when render_processes_chart() gets called. But it leads to a negative height when other charts are drawn above it, and then the grid gets drawn on top of those other charts. Substracting some constant is relevant because otherwise the box is slightly larger than the process bars. Not sure exactly where that comes from (text height?); leg_s seems a suitable constant and happens to be 10, so everything still gets rendered exactly as before. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-03scripts/pybootchart: Fix print statementRichard Purdie
This was broken with the python3 fixes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: python3: get rid of __future__ importsEd Bartosh
Removed print_function and with_statement imports from __future__ as they're supported by python 3 by default. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12scripts: use '/usr/bin/env' in shebangs with pythonMartin Hundebøll
To support yocto on systems with python3 as default version, scripts should use /usr/bin/env python in the shebang, as this allows the use of a fake env to mimic python2 as default version. This patch simply replaces occurrences of #!/usr/bin/python with #!/usr/bin/env python and was done with this oneliner: git grep -lE '^#!/usr/bin/python' | xargs \ sed -i 's|/usr/bin/python|/usr/bin/env python|' Signed-off-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-22pybootchartgui: Add option -T to allways use the full timePeter Kjellerstedt
When --full-time (or -T) is used, the graph allways shows the full time regardless of which processes are currently shown. This is especially useful in combinationm with the -s flag when outputting to multiple files. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-22pybootchartgui: Adopt the width of the index in split output filesPeter Kjellerstedt
Add minimum width zero-padding to the index used in split output files with -s and -o. I.e., if -s 200 is used, then the index will be zero-padded to three digits width. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-22pybootchartgui: Simplify adding processes to the tracePeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-22pybootchartgui: Correct the legendPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-22pybootchartgui: Make the -s option work againPeter Kjellerstedt
[YOCTO #5588] Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Add option --minutes to show time in minutesPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Add a color for the package_write_* tasksPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Reorder the legend to match the task execution orderPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Make bars without a specified color whitePeter Kjellerstedt
Previously they were transparent. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Make "Show more" show all processesPeter Kjellerstedt
While "Show more" is enabled, all processes are shown, regardless of --mintime. This also has the added benefit of making the first shown bar start at its correct offset from the start time, rather than always starting at 0. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Draw a lot less ticksPeter Kjellerstedt
With this, one second ticks are only enabled if the width of a second is five pixels or more. It is also possible to distinguish 1, 5 and 30 second ticks. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Disable options that do not make sensePeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: No need to do a double list comprehension over filesPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Avoid having overlapping process barsPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Use correct header heightPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Correct the X offset for the chartPeter Kjellerstedt
This will make the first bar actually start within the graph. It will also move the graph to the right so the names of the first tasks are more likely to be visible. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Set the initial state of "Show more" correctlyPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Make the horizontal scaling stay within boundsPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Import pybootchartgui 0.14.5Peter Kjellerstedt
This update the pybootchartgui code to the latest release from its new location at "https://github.com/mmeeks/bootchart". This only imports the relevant parts, and not all of bootchart2. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>