From: compudj Date: Wed, 31 Aug 2005 19:16:04 +0000 (+0000) Subject: change default offset X-Git-Tag: v0.12.20~2390 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1caf96c1c6694cce9ba58f5582de62572781494b;p=lttv.git change default offset git-svn-id: http://ltt.polymtl.ca/svn@1099 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/lttv/batchtest.c b/ltt/branches/poly/lttv/lttv/batchtest.c index 9c6adf9a..bb19955e 100644 --- a/ltt/branches/poly/lttv/lttv/batchtest.c +++ b/ltt/branches/poly/lttv/lttv/batchtest.c @@ -710,6 +710,18 @@ static gboolean process_traceset(void __UNUSED__ *hook_data, g_warning("Problem with seek_n ! Positions differ. (4)"); } + lttv_traceset_context_position_save(tsc, saved_pos); + t0 = get_time(); + lttv_process_traceset_seek_n_backward(tsc, 10, + seek_back_default_offset, lttv_process_traceset_seek_time, NULL); + t1 = get_time(); + g_message("Seek backward 10 events in %g seconds", t1 - t0); + t0 = get_time(); + count = lttv_process_traceset_seek_n_forward(tsc, 10, NULL); + t1 = get_time(); + g_message("Seek forward 10 events in %g seconds", t1 - t0); + + /* try a volountary error */ lttv_process_traceset_seek_time(tsc, ltt_time_infinite); @@ -729,7 +741,8 @@ static gboolean process_traceset(void __UNUSED__ *hook_data, count = lttv_process_traceset_seek_n_forward(tsc, 200000, NULL); lttv_traceset_context_position_save(tsc, saved_pos); lttv_process_traceset_seek_n_backward(tsc, 100301, - seek_back_default_offset, lttv_state_traceset_seek_time_closest, NULL); + seek_back_default_offset, + (seek_time_fct)lttv_state_traceset_seek_time_closest, NULL); count = lttv_process_traceset_seek_n_forward(tsc, 100301, NULL); if(lttv_traceset_context_ctx_pos_compare(tsc, saved_pos)) { diff --git a/ltt/branches/poly/lttv/lttv/tracecontext.h b/ltt/branches/poly/lttv/lttv/tracecontext.h index c200ff51..37c4ba17 100644 --- a/ltt/branches/poly/lttv/lttv/tracecontext.h +++ b/ltt/branches/poly/lttv/lttv/tracecontext.h @@ -348,7 +348,7 @@ void lttv_process_traceset_get_sync_data(LttvTracesetContext *tsc); #define BACKWARD_SEEK_MUL 2 /* Multiplication factor of time_offset between backward seek iterations */ -static const LttTime seek_back_default_offset = { 0, 100000000 }; +static const LttTime seek_back_default_offset = { 1, 0 }; guint lttv_process_traceset_seek_n_forward(LttvTracesetContext *self, guint n,