-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(base,event,eventx): 添加了wrapped_recorder.h,用于在编译期可配置recorder.h的开关
- Loading branch information
Showing
11 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,6 @@ MODULES += jsonrpc | |
|
||
## 第三方库依赖 | ||
THIRDPARTY += nlohmann | ||
|
||
## 编译配置 | ||
CCFLAGS += -DENABLE_TRACE_RECORDER=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* .============. | ||
* // M A K E / \ | ||
* // C++ DEV / \ | ||
* // E A S Y / \/ \ | ||
* ++ ----------. \/\ . | ||
* \\ \ \ /\ / | ||
* \\ \ \ / | ||
* \\ \ \ / | ||
* -============' | ||
* | ||
* Copyright (c) 2024 Hevake and contributors, all rights reserved. | ||
* | ||
* This file is part of cpp-tbox (https://github.com/cpp-main/cpp-tbox) | ||
* Use of this source code is governed by MIT license that can be found | ||
* in the LICENSE file in the root of the source tree. All contributing | ||
* project authors may be found in the CONTRIBUTORS.md file in the root | ||
* of the source tree. | ||
*/ | ||
/** | ||
* 在 recorder.h 的基础上加 ENABLE_TRACE_RECORDER 宏开关 | ||
* 使 recorder 功能可以在编译期间被关彻底关闭 | ||
*/ | ||
#ifndef TBOX_TRACE_WRAPPED_RECORDER_H_20240610 | ||
#define TBOX_TRACE_WRAPPED_RECORDER_H_20240610 | ||
|
||
#if ENABLE_TRACE_RECORDER | ||
#include "recorder.h" | ||
#else | ||
#define RECORD_SCOPE() | ||
#define RECORD_DEFINE(name) | ||
#define RECORD_START(name) | ||
#define RECORD_STOP(name) | ||
#define RECORD_EVENT() | ||
#endif | ||
|
||
#endif //TBOX_TRACE_WRAPPED_RECORDER_H_20240610 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters