• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/support/scripts/graph-build-time
Luca CeresoliLuca Ceresoli committed 9722381c0da12 Oct 2014
Raw file
Source viewDiff to previous
    plt.xticks(ind + .6, [ p.name for p in data ], rotation=-60, rotation_mode="anchor", fontsize=8, ha='left')
 
1
#!/usr/bin/env python
2
​
3
# Copyright (C) 2011 by Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4
# Copyright (C) 2013 by Yann E. MORIN <yann.morin.1998@free.fr>
5
#
6
# This program is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 2 of the License, or
9
# (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
# General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
​
20
# This script generates graphs of packages build time, from the timing
21
# data generated by Buildroot in the $(O)/build-time.log file.
22
#
23
# Example usage:
24
#
25
#   cat $(O)/build-time.log | ./support/scripts/graph-build-time --type=histogram --output=foobar.pdf
26
#
27
# Three graph types are available :
28
#
29
#   * histogram, which creates an histogram of the build time for each
30
#     package, decomposed by each step (extract, patch, configure,
31
#     etc.). The order in which the packages are shown is
32
#     configurable: by package name, by build order, or by duration
33
#     order. See the --order option.
34
#
35
#   * pie-packages, which creates a pie chart of the build time of
36
#     each package (without decomposition in steps). Packages that
37
#     contributed to less than 1% of the overall build time are all
38
#     grouped together in an "Other" entry.
39
#
40
#   * pie-steps, which creates a pie chart of the time spent globally
41
#     on each step (extract, patch, configure, etc...)
42
#
43
# The default is to generate an histogram ordered by package name.
44
#
45
# Requirements:
46
#
47
#   * matplotlib (python-matplotlib on Debian/Ubuntu systems)
48
#   * numpy (python-numpy on Debian/Ubuntu systems)
49
#   * argparse (by default in Python 2.7, requires python-argparse if
50
#     Python 2.6 is used)
51
​
52
import sys
53
​
54
try:
55
    import matplotlib as mpl
56
    import numpy
57
except ImportError:
58
    sys.stderr.write("You need python-matplotlib and python-numpy to generate build graphs\n")
59
    exit(1)
60
​
61
# Use the Agg backend (which produces a PNG output, see
62
# http://matplotlib.org/faq/usage_faq.html#what-is-a-backend),
63
# otherwise an incorrect backend is used on some host machines).
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.