From 722a4965e5f894c8689be80b09fa47cec02a89d8 Mon Sep 17 00:00:00 2001 From: lhausamm <loic_hausammann@hotmail.com> Date: Sun, 27 May 2018 20:01:15 +0200 Subject: [PATCH] Write only snapshot or index file --- src/engine.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/engine.c b/src/engine.c index 8ecdbd4f5e..429727a093 100644 --- a/src/engine.c +++ b/src/engine.c @@ -5626,8 +5626,9 @@ void engine_check_for_dumps(struct engine *e) { engine_print_stats(e); #ifdef WITH_LOGGER engine_dump_index(e); +#else + engine_dump_snapshot(e); #endif - engine_dump_snapshot(e); } else if (e->ti_next_stats < e->ti_next_snapshot) { @@ -5659,8 +5660,9 @@ void engine_check_for_dumps(struct engine *e) { /* Dump snapshot */ #ifdef WITH_LOGGER engine_dump_index(e); -#endif +#else engine_dump_snapshot(e); +#endif } else if (e->ti_next_stats > e->ti_next_snapshot) { @@ -5680,8 +5682,9 @@ void engine_check_for_dumps(struct engine *e) { /* Dump snapshot */ #ifdef WITH_LOGGER engine_dump_index(e); -#endif +#else engine_dump_snapshot(e); +#endif /* Let's fake that we are at the stats dump time */ e->ti_current = e->ti_next_stats; @@ -5718,8 +5721,9 @@ void engine_check_for_dumps(struct engine *e) { /* Dump... */ #ifdef WITH_LOGGER engine_dump_index(e); -#endif +#else engine_dump_snapshot(e); +#endif /* ... and find the next output time */ engine_compute_next_snapshot_time(e); @@ -7166,7 +7170,7 @@ void engine_config(int restart, struct engine *e, struct swift_params *params, "size, please use it carefully"); #endif - /* Find the time of the first output */ + /* Find the time of the first snapshot output */ engine_compute_next_snapshot_time(e); /* Find the time of the first statistics output */ -- GitLab