Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fixes in docs/source/tuto_* (untested).
[simgrid.git] / docs / source / tuto_disk / tuto_disk.cpp
index c84dc16..0f487ff 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2017-2023. 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. */
@@ -35,7 +35,7 @@ static void estimate_bw(const sg4::Disk* disk, int n, int n_flows, bool read)
     act->wait();
 
   double elapsed_time = sg4::Engine::get_clock() - cur_time;
-  printf("%s,%s,%d,%d,%d,%lf\n", disk->get_cname(), read ? "read" : "write", n, n_flows, size, elapsed_time);
+  printf("%s,%s,%d,%d,%llu,%lf\n", disk->get_cname(), read ? "read" : "write", n, n_flows, size, elapsed_time);
 }
 
 static void host()
@@ -60,7 +60,7 @@ class DiskNoise {
   std::mt19937& gen_;
 
 public:
-  DiskNoise(double capacity, std::mt19937& gen, const std::vector<double>& b, const std::vector<double> h)
+  DiskNoise(double capacity, std::mt19937& gen, const std::vector<double>& b, const std::vector<double>& h)
       : bw_(capacity), breaks_(b), heights_(h), gen_(gen)
   {
   }
@@ -119,7 +119,6 @@ static double disk_variability(const std::unordered_map<sg4::Io::OpType, DiskNoi
 static void create_disk(sg4::Host* host, std::mt19937& gen, const std::string& disk_name,
                         const boost::property_tree::ptree& pt)
 {
-
   double read_bw                = pt.get_child("read_bw").begin()->second.get_value<double>() * 1e6;
   double write_bw               = pt.get_child("write_bw").begin()->second.get_value<double>() * 1e6;
   auto* disk                    = host->create_disk(disk_name, read_bw, write_bw);