Ejemplo n.º 1
0
def renderComponent(component, allStats):
    print("Rendering component " + component)
    code = html.getHtmlHeader(component)
    code += html.generateStatistics(allStats, component)
    code += html.getHtmlEnd()
    file = open(component + ".htm", "w")
    file.write(code)
    file.close()
Ejemplo n.º 2
0
def renderComponent(component, allStats):
    print("Rendering component " + component)
    code = html.getHtmlHeader(component)
    code += html.generateStatistics(allStats, component)
    code += html.getHtmlEnd()
    file = open(component + ".htm", "w")
    file.write(code)
    file.close()
Ejemplo n.º 3
0
            self['name'] = values[3]


# Read in data
allFunctions = []
try:
    f = open(PathToProfileBuild + 'server.prof')
except:
    # Generate readable output
    here = os.getcwd()
    os.chdir(PathToProfileBuild)
    os.system('gprof alacarte-server gmon.out > server.prof')
    os.chdir(here)
for i, line in enumerate(f):
    if i < 5:
        # Skip headings
        continue
    if line == "\n":
        # Stop before callstack
        break
    allFunctions.append(function(line))
code = html.getHtmlHeader('gprof')
code += html.makeSortableTable(allFunctions, [
    'percentage', 'totalTime', 'ownTime', 'calls', 'ownTimePerCall',
    'totalTimePerCall', 'name'
])
code += html.getHtmlEnd()
file = open('gprof.htm', 'w')
file.write(code)
file.close()
Ejemplo n.º 4
0
            values = line.split(None, 3)
            self['calls'] = 0
            self['ownTimePerCall'] = 0
            self['totalTimePerCall'] = 0
            self['name'] = values[3]

# Read in data
allFunctions = []
try:
    f = open(PathToProfileBuild + 'server.prof')
except:
    # Generate readable output
    here = os.getcwd()
    os.chdir(PathToProfileBuild)
    os.system('gprof alacarte-server gmon.out > server.prof')
    os.chdir(here)
for i, line in enumerate(f):
    if i < 5:
        # Skip headings
        continue
    if line == "\n":
        # Stop before callstack
        break
    allFunctions.append(function(line))
code = html.getHtmlHeader('gprof')
code += html.makeSortableTable(allFunctions, ['percentage', 'totalTime', 'ownTime', 'calls', 'ownTimePerCall', 'totalTimePerCall', 'name'])
code += html.getHtmlEnd()
file = open('gprof.htm', 'w')
file.write(code)
file.close()