Files
clang-p2996/lldb/test/API/commands/statistics/basic/BoxFormatter.py
Jacob Lalonde 22144e20cb [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (#102708)
This PR adds a statistics provider cache, which allows an individual
target to keep a rolling tally of it's total time and number of
invocations for a given summary provider. This information is then
available in statistics dump to help slow summary providers, and gleam
more into insight into LLDB's time use.
2024-09-10 09:58:43 -07:00

16 lines
313 B
Python

import lldb
def summary(valobj, dict):
return f"[{valobj.GetChildAtIndex(0).GetValue()}]"
def __lldb_init_module(debugger, dict):
typeName = "Box<.*$"
debugger.HandleCommand(
'type summary add -x "'
+ typeName
+ '" --python-function '
+ f"{__name__}.summary"
)