projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into benchmark
[lttng-tools.git]
/
benchmark
/
bench-sessions.c
diff --git
a/benchmark/bench-sessions.c
b/benchmark/bench-sessions.c
index 872b596b6d78888def181b0ae842699409778ce3..f56312e35d96231f8c2ba7a8bfab95c3cc5b9b7b 100644
(file)
--- a/
benchmark/bench-sessions.c
+++ b/
benchmark/bench-sessions.c
@@
-25,7
+25,7
@@
#include <unistd.h>
#include <time.h>
#include <unistd.h>
#include <time.h>
-#include "ltt-sessiond/session.h"
+#include "ltt
ng
-sessiond/session.h"
#include "utils.h"
#include "benchmark.h"
#include "utils.h"
#include "benchmark.h"
@@
-65,6
+65,7
@@
int main(int argc, char **argv)
int ret, i, nb_iter;
char **names;
double value, total = 0;
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");
if (getuid() != 0) {
printf("Aborting test. Must be uid 0 to drop_caches\n");
@@
-88,7
+89,7
@@
int main(int argc, char **argv)
names[i] = get_random_string();
ret = system("echo 3 >/proc/sys/vm/drop_caches");
tracepoint(create_session_start);
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");
tracepoint(create_session_end);
if (ret < 0) {
printf("Create session went wrong. Aborting\n");
@@
-104,9
+105,10
@@
int main(int argc, char **argv)
fprintf(fp, "--- Destroy tracing session ---\n");
for (i = 0; i < nb_iter; i++) {
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 = 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");
tracepoint(destroy_session_end);
if (ret < 0) {
printf("Destroy session went wrong. Aborting\n");
This page took
0.042433 seconds
and
4
git commands to generate.