]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/dmclock/sim/src/test_ssched_main.cc
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / dmclock / sim / src / test_ssched_main.cc
index 14ff7e9b47040eef906489d7352746506759a4a3..4e7733b815c9b16fa3e971f4afd667baf984efc4 100644 (file)
@@ -3,6 +3,13 @@
 
 /*
  * Copyright (C) 2016 Red Hat Inc.
+ *
+ * Author: J. Eric Ivancich <ivancich@redhat.com>
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License version
+ * 2.1, as published by the Free Software Foundation.  See file
+ * COPYING.
  */
 
 
@@ -34,6 +41,9 @@ namespace crimson {
                     int head_w, int data_w, int data_prec);
   } // namespace test_simple
 } // namespace crimson
+
+
+using Cost = uint32_t;
     
 
 int main(int argc, char* argv[]) {
@@ -71,7 +81,7 @@ int main(int argc, char* argv[]) {
                  const ClientId& client_id,
                  const ssched::ReqParams& req_params) {
     auto& server = simulation->get_server(server_id);
-    server.post(std::move(request), client_id, req_params);
+    server.post(std::move(request), client_id, req_params, 1u);
   };
 
   static std::vector<sim::CliInst> no_wait =
@@ -97,10 +107,12 @@ int main(int argc, char* argv[]) {
     [&simulation](ClientId client_id,
                  const sim::TestResponse& resp,
                  const ServerId& server_id,
-                 const ssched::NullData& resp_params) {
+                 const ssched::NullData& resp_params,
+                 Cost request_cost) {
     simulation->get_client(client_id).receive_response(resp,
                                                       server_id,
-                                                      resp_params);
+                                                      resp_params,
+                                                      request_cost);
   };
 
   test::CreateQueueF create_queue_f =