Gazebo Common

API Reference

6.1.0
ProfilerImpl.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18#ifndef GZ_COMMON_PROFILERIMPL_HH_
19#define GZ_COMMON_PROFILERIMPL_HH_
20
21#include <cstdint>
22#include <string>
23
24#include <gz/common/profiler/Export.hh>
25
26namespace gz
27{
28 namespace common
29 {
31 class GZ_COMMON_PROFILER_VISIBLE ProfilerImpl
32 {
34 public: ProfilerImpl() = default;
35
37 public: virtual ~ProfilerImpl() = default;
38
40 public: virtual std::string Name() const = 0;
41
44 public: virtual void SetThreadName(const char *_name) = 0;
45
50 public: virtual void LogText(const char *_text) = 0;
51
59 public: virtual void BeginSample(const char *_name, uint32_t *_hash) = 0;
60
62 public: virtual void EndSample() = 0;
63 };
64 }
65}
66
67#endif // GZ_COMMON_PROFILERIMPL_HH_