using System;
namespace BestHTTP.Statistics
{
    [Flags]
    public enum StatisticsQueryFlags : byte
    {
        /// 
        /// Connection based statistics will be returned as the result of the query.
        /// 
        Connections = 0x01,
        /// 
        /// Caching based statistics will be returned as the result of the query.
        /// 
        Cache = 0x02,
        /// 
        /// Cookie based statistics will be returned as the result of the query.
        /// 
        Cookies = 0x04,
        /// 
        /// All statistics will be returned as the result of the query.
        /// 
        All = 0xFF,
    }
    public struct GeneralStatistics
    {
        public StatisticsQueryFlags QueryFlags;
        #region Connection Statistics
        /// 
        /// Number of HTTPConnection instances
        /// 
        public int Connections;
        /// 
        /// Number of active connections. These connections are currently processing a request.
        /// 
        public int ActiveConnections;
        /// 
        /// Number of free connections. These connections are finished with there requests and waiting for another request or to recycle.
        /// 
        public int FreeConnections;
        /// 
        /// Number of recycled connections. These connections will be removed as soon as possible.
        /// 
        public int RecycledConnections;
        /// 
        /// Number of requests that are waiting in the queue for a free connection.
        /// 
        public int RequestsInQueue;
        #endregion
        #region Cache Statistics
        /// 
        /// Number of cached responses.
        /// 
        public int CacheEntityCount;
        /// 
        /// Sum size of the cached responses in bytes.
        /// 
        public ulong CacheSize;
        #endregion
        #region Cookie Statistics
        /// 
        /// Number of cookies in the Cookie Jar.
        /// 
        public int CookieCount;
        /// 
        /// Sum size of the stored cookies in bytes.
        /// 
        public uint CookieJarSize;
        #endregion
    }
}