Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / dmclock / sim / src / test_dmclock.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 /*
5  * Copyright (C) 2016 Red Hat Inc.
6  */
7
8
9 #include "dmclock_recs.h"
10 #include "dmclock_server.h"
11 #include "dmclock_client.h"
12
13 #include "sim_recs.h"
14 #include "sim_server.h"
15 #include "sim_client.h"
16
17 #include "test_dmclock.h"
18
19
20 namespace test = crimson::test_dmc;
21
22
23 void test::dmc_server_accumulate_f(test::DmcAccum& a,
24                                    const test::dmc::PhaseType& phase) {
25   if (test::dmc::PhaseType::reservation == phase) {
26     ++a.reservation_count;
27   } else {
28     ++a.proportion_count;
29   }
30 }
31
32
33 void test::dmc_client_accumulate_f(test::DmcAccum& a,
34                                    const test::dmc::PhaseType& phase) {
35   if (test::dmc::PhaseType::reservation == phase) {
36     ++a.reservation_count;
37   } else {
38     ++a.proportion_count;
39   }
40 }