X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dff9e15c44ab6340d27215957c56fa72fad246a2..1b6d36b7082f7cc657eb2473d1ac27d250954688:/testsuite/surf/trace_usage.c diff --git a/testsuite/surf/trace_usage.c b/testsuite/surf/trace_usage.c index 1d0dcb34a2..5b1de6d862 100644 --- a/testsuite/surf/trace_usage.c +++ b/testsuite/surf/trace_usage.c @@ -1,8 +1,7 @@ -/* $Id$ */ - /* A few tests for the trace library */ -/* Copyright (c) 2004 Arnaud Legrand. All rights reserved. */ +/* Copyright (c) 2004, 2005, 2006, 2009, 2010. The SimGrid Team. + * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -10,21 +9,24 @@ #pragma hdrstop #endif -#include -#include -#include #include "surf/trace_mgr.h" #include "surf/surf.h" #include "xbt/log.h" -XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example"); + +#include +#include +#include + +XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, + "Messages specific for surf example"); void test(void); void test(void) { tmgr_history_t history = tmgr_history_new(); - tmgr_trace_t trace_A = tmgr_trace_new("trace_A.txt"); - tmgr_trace_t trace_B = tmgr_trace_new("trace_B.txt"); + tmgr_trace_t trace_A = tmgr_trace_new_from_file("trace_A.txt"); + tmgr_trace_t trace_B = tmgr_trace_new_from_file("trace_B.txt"); double next_event_date = -1.0; double value = -1.0; char *resource = NULL; @@ -35,10 +37,10 @@ void test(void) tmgr_history_add_trace(history, trace_B, 0.0, 0, host_B); while ((next_event_date = tmgr_history_next_date(history)) != -1.0) { - DEBUG1("%g" " : \n", next_event_date); + XBT_DEBUG("%g" " : \n", next_event_date); while (tmgr_history_get_next_event_leq(history, next_event_date, &value, (void **) &resource)) { - DEBUG2("\t %s : " "%g" "\n", resource, value); + XBT_DEBUG("\t %s : " "%g" "\n", resource, value); } if (next_event_date > 1000) break;