• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #882

31 Aug 2023 07:44PM UTC coverage: 41.798% (-44.7%) from 86.546%
#882

push

19442 of 46514 relevant lines covered (41.8%)

126375.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/libs/full/performance_counters/src/server/base_performance_counter.cpp
1
//  Copyright (c) 2007-2025 Hartmut Kaiser
2
//
3
//  SPDX-License-Identifier: BSL-1.0
4
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
5
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6

7
#include <hpx/config.hpp>
8
#include <hpx/actions/transfer_action.hpp>
9
#include <hpx/actions_base/component_action.hpp>
10
#include <hpx/async_distributed/base_lco_with_value.hpp>
11
#include <hpx/async_distributed/transfer_continuation_action.hpp>
12
#include <hpx/components_base/component_type.hpp>
13
#include <hpx/components_base/server/component.hpp>
14
#include <hpx/modules/errors.hpp>
15
#include <hpx/modules/thread_support.hpp>
16
#include <hpx/performance_counters/counters.hpp>
17
#include <hpx/performance_counters/performance_counter_base.hpp>
18
#include <hpx/performance_counters/server/base_performance_counter.hpp>
19

20
HPX_DEFINE_GET_COMPONENT_TYPE(hpx::components::component<
×
21
    hpx::performance_counters::server::base_performance_counter>)
22

23
///////////////////////////////////////////////////////////////////////////////
24
namespace hpx { namespace performance_counters { namespace server {
25

26
    void base_performance_counter::reset_counter_value()
×
27
    {
28
        HPX_THROW_EXCEPTION(hpx::error::invalid_status, "reset_counter_value",
×
29
            "reset_counter_value is not implemented for this counter");
30
    }
31

32
    void base_performance_counter::set_counter_value(
×
33
        counter_value const& /*value*/)
34
    {
35
        HPX_THROW_EXCEPTION(hpx::error::invalid_status, "set_counter_value",
×
36
            "set_counter_value is not implemented for this counter");
37
    }
38

39
    counter_value base_performance_counter::get_counter_value(bool /*reset*/)
×
40
    {
41
        HPX_THROW_EXCEPTION(hpx::error::invalid_status, "get_counter_value",
×
42
            "get_counter_value is not implemented for this counter");
43
        return {};
44
    }
45

46
    counter_values_array base_performance_counter::get_counter_values_array(
×
47
        bool /*reset*/)
48
    {
49
        HPX_THROW_EXCEPTION(hpx::error::invalid_status,
×
50
            "get_counter_values_array",
51
            "get_counter_values_array is not implemented for this "
52
            "counter");
53
        return {};
54
    }
55

56
    bool base_performance_counter::start()
×
57
    {
58
        return false;    // nothing to do
×
59
    }
60

61
    bool base_performance_counter::stop()
×
62
    {
63
        return false;    // nothing to do
×
64
    }
65

66
    void base_performance_counter::reinit(bool /*reset*/) {}
×
67

68
    counter_info base_performance_counter::get_counter_info() const
×
69
    {
70
        return info_;
×
71
    }
72

73
    base_performance_counter::base_performance_counter()
×
74
      : invocation_count_(0)
×
75
    {
76
    }
×
77

78
    base_performance_counter::base_performance_counter(counter_info const& info)
×
79
      : info_(info)
×
80
      , invocation_count_(0)
×
81
    {
82
    }
×
83

84
    ///////////////////////////////////////////////////////////////////////
85
    counter_info base_performance_counter::get_counter_info_nonvirt() const
×
86
    {
87
        return this->get_counter_info();
×
88
    }
89

90
    counter_value base_performance_counter::get_counter_value_nonvirt(
×
91
        bool reset)
92
    {
93
        return this->get_counter_value(reset);
×
94
    }
95

96
    counter_values_array
97
    base_performance_counter::get_counter_values_array_nonvirt(bool reset)
×
98
    {
99
        return this->get_counter_values_array(reset);
×
100
    }
101

102
    void base_performance_counter::set_counter_value_nonvirt(
×
103
        counter_value const& info)
104
    {
105
        this->set_counter_value(info);
×
106
    }
×
107

108
    void base_performance_counter::reset_counter_value_nonvirt()
×
109
    {
110
        this->reset_counter_value();
×
111
    }
×
112

113
    bool base_performance_counter::start_nonvirt()
×
114
    {
115
        return this->start();
×
116
    }
117

118
    bool base_performance_counter::stop_nonvirt()
×
119
    {
120
        return this->stop();
×
121
    }
122

123
    void base_performance_counter::reinit_nonvirt(bool reset)
×
124
    {
125
        reinit(reset);
×
126
    }
×
127
}}}    // namespace hpx::performance_counters::server
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc