#include <unistd.h>
#include <time.h>
-#include "ltt-sessiond/session.h"
+#include "lttng-sessiond/session.h"
#include "utils.h"
#include "benchmark.h"
int ret, i, nb_iter;
char **names;
double value, total = 0;
+ struct ltt_session *session;
if (getuid() != 0) {
printf("Aborting test. Must be uid 0 to drop_caches\n");
names[i] = get_random_string();
ret = system("echo 3 >/proc/sys/vm/drop_caches");
tracepoint(create_session_start);
- ret = create_session(names[i], PATH1);
+ ret = session_create(names[i], PATH1);
tracepoint(create_session_end);
if (ret < 0) {
printf("Create session went wrong. Aborting\n");
fprintf(fp, "--- Destroy tracing session ---\n");
for (i = 0; i < nb_iter; i++) {
+ session = session_find_by_name(names[i]);
ret = system("echo 3 >/proc/sys/vm/drop_caches");
tracepoint(destroy_session_start);
- ret = destroy_session(names[i]);
+ ret = session_destroy(session);
tracepoint(destroy_session_end);
if (ret < 0) {
printf("Destroy session went wrong. Aborting\n");