diff options
Diffstat (limited to 'test/endless/test-profile.c')
-rw-r--r-- | test/endless/test-profile.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/endless/test-profile.c b/test/endless/test-profile.c new file mode 100644 index 0000000..398858e --- /dev/null +++ b/test/endless/test-profile.c @@ -0,0 +1,30 @@ +/* Copyright 2017 Endless Mobile, Inc. */ + +#include <stdlib.h> +#include <endless/endless.h> + +#include "run-tests.h" + +static void +test_profile_stdout (void) +{ + g_autoptr(EosProfileProbe) probe = EOS_PROFILE_PROBE ("/sdk/profile/main"); + + for (int i = 0; i < 256000; i++) + { + g_autoptr(EosProfileProbe) inner = EOS_PROFILE_PROBE ("/sdk/profile/inner-loop"); + + GArray *array = g_array_new (FALSE, FALSE, sizeof (int)); + + for (int j = 0; j < 1000; j++) + g_array_append_val (array, j); + + g_array_unref (array); + } +} + +void +add_profile_tests (void) +{ + g_test_add_func ("/profile/stdout", test_profile_stdout); +} |