-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(new_metrics): refactor enum definition for metric types and …
…units (#1491) #1490 For the enum classes, such as metric type and unit, in addition to the declaration of all enumerators, extra code is needed to implement `enum_to_string` for each enumerator. However, the "extra code" tended to be forgotten, just as what has been said in the above issue #1490. Therefore, we should find a way that could share all the enumerators between the declaration and `enum_to_string`. Each enumerator would be written only once, and there is no need to remember to add `enum_to_string` for each enumerator. We could implement the "sharing" by function-like macros. They have the names of all the enumerators, and accept an argument to perform custom actions over the names to implement the "sharing". Both metric types and units would be refactored in this way. While building ASAN Github actions failed due to running out of disk space. This problem is resolved by dropping all directories of `CMakeFiles`, which is also tracked another issue: #1497
- Loading branch information
Showing
4 changed files
with
328 additions
and
56 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
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
Oops, something went wrong.