You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2021/12/29 09:29:51 UTC
[GitHub] [logging-log4cxx] ams-tschoening commented on a change in pull request #92: Allow throughputtests to be built when LOGCHAR_IS_WCHAR is on
ams-tschoening commented on a change in pull request #92:
URL: https://github.com/apache/logging-log4cxx/pull/92#discussion_r776230335
##########
File path: src/test/cpp/throughput/throughput-main.cpp
##########
@@ -71,14 +74,14 @@ static void benchmark_conversion_pattern( std::string name,
delta_d,
int(howmany / delta_d) );
- results.push_back( howmany / delta_d );
+ results.push_back( uint64_t(howmany / delta_d) );
Review comment:
If `results` use `uint64_t`, shouldn't the line above use that type as well? How about the following for those two places instead, which prevents double calculation at the same time.
```cpp
results.push_back( uint64_t(howmany / delta_d) );
LOG4CXX_INFO_FMT( console, "Log4cxx {} pattern: {} Elapsed: {:.4} secs {:L}/sec",
name,
conversion_pattern,
delta_d,
results.back());
```
[ghpr_92.diff.txt](https://github.com/apache/logging-log4cxx/files/7787940/ghpr_92.diff.txt)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org