Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:08:25

0001 /* Copyright (c) 2018-2024 Marcelo Zimbres Silva (mzimbres@gmail.com)
0002  *
0003  * Distributed under the Boost Software License, Version 1.0. (See
0004  * accompanying file LICENSE.txt)
0005  */
0006 
0007 #ifndef BOOST_REDIS_USAGE_HPP
0008 #define BOOST_REDIS_USAGE_HPP
0009 
0010 namespace boost::redis
0011 {
0012 
0013 /** @brief Connection usage information.
0014  *  @ingroup high-level-api
0015  *
0016  *  @note: To simplify the implementation, the commands_sent and
0017  *  bytes_sent in the struct below are computed just before writing to
0018  *  the socket, which means on error they might not represent exactly
0019  *  what has been received by the Redis server.
0020  */
0021 struct usage {
0022    /// Number of commands sent.
0023    std::size_t commands_sent = 0;
0024 
0025    /// Number of bytes sent.
0026    std::size_t bytes_sent = 0;
0027 
0028    /// Number of responses received.
0029    std::size_t responses_received = 0;
0030 
0031    /// Number of pushes received.
0032    std::size_t pushes_received = 0;
0033 
0034    /// Number of response-bytes received.
0035    std::size_t response_bytes_received = 0;
0036 
0037    /// Number of push-bytes received.
0038    std::size_t push_bytes_received = 0;
0039 };
0040 
0041 } // boost::redis
0042 
0043 #endif // BOOST_REDIS_USAGE_HPP