Files
clang-p2996/lldb/test/API/commands/statistics/basic/main.cpp
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

36 lines
615 B
C++

// Test that the lldb command `statistics` works.
#include <string>
#include <vector>
template <typename T> class Box {
T m_value;
public:
Box(T value) : m_value(value) {}
};
void foo() {
std::string str = "hello world";
str += "\n"; // stop here
}
void bar(int x) {
auto box = Box<int>(x);
// stop here
}
void vec() {
std::vector<int> int_vec = {1, 2, 3, 4, 5, 6, 7, 8};
std::vector<double> double_vec = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
// stop vector
int x = int_vec.size();
}
int main(void) {
int patatino = 27;
foo();
bar(patatino);
vec();
return 0; // break here
}