Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use MSG_task_get_flops_amount() when we don't want a ratio
[simgrid.git] / examples / msg / cloud-capping / cloud-capping.c
index b27d11e..4471034 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2007-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2017. 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. */
@@ -76,8 +75,8 @@ static void test_dynamic_change(void)
   MSG_process_create("worker0", worker_busy_loop_main, &task0, (msg_host_t)vm0);
   MSG_process_create("worker1", worker_busy_loop_main, &task1, (msg_host_t)vm1);
 
-  double task0_remain_prev = MSG_task_get_remaining_work_ratio(task0);
-  double task1_remain_prev = MSG_task_get_remaining_work_ratio(task1);
+  double task0_remain_prev = MSG_task_get_flops_amount(task0);
+  double task1_remain_prev = MSG_task_get_flops_amount(task1);
 
   const double cpu_speed = MSG_host_get_speed(pm0);
   for (int i = 0; i < 10; i++) {
@@ -86,8 +85,8 @@ static void test_dynamic_change(void)
     MSG_vm_set_bound(vm1, new_bound);
     MSG_process_sleep(100);
 
-    double task0_remain_now = MSG_task_get_remaining_work_ratio(task0);
-    double task1_remain_now = MSG_task_get_remaining_work_ratio(task1);
+    double task0_remain_now = MSG_task_get_flops_amount(task0);
+    double task1_remain_now = MSG_task_get_flops_amount(task1);
 
     double task0_flops_per_sec = task0_remain_prev - task0_remain_now;
     double task1_flops_per_sec = task1_remain_prev - task1_remain_now;