Skip to content

Commit aa9014d

Browse files
committed
update cmake, update performance metrics
1 parent c97b368 commit aa9014d

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ else()
7878
set(LINK_DEPENDENCIES pthread ${Boost_LIBRARIES} catch_lib) # asan ubsan
7979
endif()
8080

81-
set(BOOST_VERSION_OK, (Boost_MAJOR_VERSION GREATER_EQUAL 1) AND (Boost_MINOR_VERSION GREATER_EQUAL 70))
81+
if ((Boost_MAJOR_VERSION GREATER_EQUAL 1) AND (Boost_MINOR_VERSION GREATER_EQUAL 70))
82+
set(BOOST_VERSION_OK true)
83+
else()
84+
set(BOOST_VERSION_OK false)
85+
endif()
86+
87+
MESSAGE(STATUS "BOOST_VERSION_OK ${BOOST_VERSION_OK}")
8288

8389
add_subdirectory(examples)
8490

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Results achieved with `examples/speed_test_async_multi.cpp` for 1 thread, Intel
6767

6868
| bredis (commands/s) | bredis(*) (commands/s) | redox (commands/s)|
6969
|---------------------|------------------------|-------------------|
70-
| 1.59325e+06 | 2.50826e+06 | 0.999375+06 |
70+
| 1.80845e+06 | 2.503e+06 | 0.999375+06 |
7171

7272
These results are not completely fair, because of the usage of different semantics in the
7373
APIs; however they are still interesting, as they are using different

examples/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ find_package(Threads REQUIRED)
22

33
set(LINK_DEPENDENCIES ${Boost_LIBRARIES} Threads::Threads)
44

5+
set(BOOST_VERSION_OK, (Boost_MAJOR_VERSION GREATER_EQUAL 1) AND (Boost_MINOR_VERSION GREATER_EQUAL 70))
6+
57
add_executable(stream-parse stream-parse.cpp)
68
target_link_libraries(stream-parse ${LINK_DEPENDENCIES})
79

examples/speed_test_async_multi.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//
1212
// bredis (commands/s) | bredis(*) (commands/s) | redox (commands/s)
1313
// ---------------------+------------------------+---------------------
14-
// 1.59325e+06 | 2.50826e+06 | 0.999375+06
14+
// 1.80845e+06 | 2.503e+06 | 0.999375+06
1515
//
1616
// Results are not completely fair, because of usage of different semantics in
1717
// APIs; however they are still interesting, as there are used different
@@ -60,8 +60,8 @@ int main(int argc, char **argv) {
6060
std::string::allocator_type
6161
>;
6262
using Iterator = typename r::to_iterator<Buffer>::iterator_t;
63-
using policy_t = r::parsing_policy::drop_result;
64-
//using policy_t = r::parsing_policy::keep_result;
63+
//using policy_t = r::parsing_policy::drop_result;
64+
using policy_t = r::parsing_policy::keep_result;
6565

6666
if (argc < 2) {
6767
std::cout << "Usage : " << argv[0] << " ip:port \n";

include/bredis/impl/async_op.ipp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ struct result_visitor_t<Iterator, parsing_policy::drop_result>
6161
size_t operator()(const positive_result_t &parse_result) {
6262
++count;
6363
cumulative_consumption += parse_result.consumed;
64-
// return parse_result.consumed;
6564
return count < replies_count ? parse_result.consumed : 0;
6665
}
6766

0 commit comments

Comments
 (0)