MCPcopy Create free account
hub / github.com/nodejs/node / output_dumps

Method output_dumps

deps/v8/tools/grokdump.py:3718–3750  ·  view source on GitHub ↗
(self, f)

Source from the content-addressed store, hash-verified

3716 return formatter
3717
3718 def output_dumps(self, f):
3719 f.write(WEB_DUMPS_HEADER)
3720 f.write("<h3>List of available dumps</h3>")
3721 f.write("<table class=\"dumplist\">\n")
3722 f.write("<thead><tr>")
3723 f.write("<th>Name</th>")
3724 f.write("<th>File time</th>")
3725 f.write("<th>Comment</th>")
3726 f.write("</tr></thead>")
3727 dumps_by_time = {}
3728 for fname in os.listdir(self.dumppath):
3729 if DUMP_FILE_RE.match(fname):
3730 mtime = os.stat(os.path.join(self.dumppath, fname)).st_mtime
3731 fnames = dumps_by_time.get(mtime, [])
3732 fnames.append(fname)
3733 dumps_by_time[mtime] = fnames
3734
3735 for mtime in sorted(dumps_by_time, reverse=True):
3736 fnames = dumps_by_time[mtime]
3737 for fname in fnames:
3738 f.write("<tr>\n")
3739 f.write("<td><a href=\"summary.html?%s\">%s</a></td>\n" %
3740 ((urllib.parse.urlencode({'dump': fname}), fname)))
3741 f.write("<td>&nbsp;&nbsp;&nbsp;")
3742 f.write(datetime.datetime.fromtimestamp(mtime))
3743 f.write("</td>")
3744 f.write("<td>&nbsp;&nbsp;&nbsp;")
3745 self.output_dump_desc_field(f, fname)
3746 f.write("</td>")
3747 f.write("</tr>\n")
3748 f.write("</table>\n")
3749 f.write(WEB_DUMPS_FOOTER)
3750 return
3751
3752class InspectionShell(cmd.Cmd):
3753 def __init__(self, reader, heap):

Callers 1

do_GETMethod · 0.80

Calls 8

sortedFunction · 0.85
matchMethod · 0.65
getMethod · 0.65
writeMethod · 0.45
statMethod · 0.45
joinMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected