short profiler logs

This commit is contained in:
Victor Olin 2023-05-08 11:00:07 +02:00
parent 3f42a8f16d
commit 50e10586f1
5 changed files with 21 additions and 88 deletions

View file

@ -32,83 +32,21 @@ Node *create_list(size_t length)
return head;
}
void print_list(Node* head)
{
cout << "\nPrinting list...\n";
while (head != nullptr)
{
cout << head->value << " ";
head = head->next;
}
cout << endl;
}
void clear_list(Node *head)
{
while (head != nullptr)
{
Node *tmp = head->next;
head->next = nullptr;
head = tmp;
}
}
#define LIST_SIZE 1000
void list_test1()
{
Node *list_1 = create_list(LIST_SIZE);
// print_list(list_1);
}
/*
void list_test2()
{
Node *list_2 = create_list(LIST_SIZE);
// print_list(list_2);
}
void list_test3()
{
Node *list_3 = create_list(LIST_SIZE);
// print_list(list_3);
}
void list_test4()
{
Node *list_4 = create_list(LIST_SIZE);
// print_list(list_4);
}
void list_test5()
{
Node *list_5 = create_list(LIST_SIZE);
// print_list(list_5);
}
void list_test6()
{
Node *list_6 = create_list(LIST_SIZE);
// print_list(list_6);
}
void make_test() {
list_test1();
list_test2();
list_test3();
list_test4();
list_test5();
list_test6();
}
*/
int main()
{
GC::Heap::init();
GC::Heap &heap = GC::Heap::the();
heap.set_profiler(true);
GC::Profiler::set_log_options(GC::FunctionCalls);
//GC::Profiler::set_log_options(GC::AllOps);
// GC::Profiler::set_log_options(GC::FunctionCalls);
// GC::Profiler::set_log_options(GC::ChunkOps);
GC::Profiler::set_log_options(GC::TimingInfo);
// make_test();
for (int i = 0; i < 1000; i++)