summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-05-09 20:50:23 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-05-20 13:54:46 -0400
commitee99ff04cf54f6416e105308eb7d2e9da7142bd7 (patch)
tree649f3744bd73fc684114c0ba4353cff6c5a2785b /tools/perf/scripts/python/export-to-postgresql.py
parent7be108a7d3d61476b7ff4c2fda2c969500f2aec9 (diff)
lib/printbuf: Tabstops, indenting
This patch adds two new features to printbuf for structured formatting: - Indent level: the indent level, as a number of spaces, may be increased with pr_indent_add() and decreased with pr_indent_sub(). Subsequent lines, when started with pr_newline() (not "\n", although that may change) will then be intended according to the current indent level. This helps with pretty-printers that structure a large amonut of data across multiple lines and multiple functions. - Tabstops: Tabstops may be set by assigning to the printbuf->tabstops array. Then, pr_tab() may be used to advance to the next tabstop, printing as many spaces as required - leaving previous output left justified to the previous tabstop. pr_tab_rjust() advances to the next tabstop but inserts the spaces just after the previous tabstop - right justifying the previously-outputted text to the next tabstop. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions