public RedisProfilingSession(string session, IRedisProfilingMetrics metrics, IRedisProfiler redisProfiler)
        {
            if (string.IsNullOrWhiteSpace(session))
            {
                throw new ArgumentException("Value cannot be null or whitespace.", nameof(session));
            }

            _session       = session;
            _metrics       = metrics ?? throw new ArgumentNullException(nameof(metrics));
            _redisProfiler = redisProfiler ?? throw new ArgumentNullException(nameof(redisProfiler));

            try
            {
                _profilingSession = redisProfiler.StartSession();
            }
            catch (Exception e)
            {
                // todo: to log exception
                _profilingSession = null;
            }
        }
 public RedisController(IRedisConnectionPool redisConnectionPool, IRedisProfiler redisProfiler)
 {
     _redisConnectionPool = redisConnectionPool ?? throw new ArgumentNullException(nameof(redisConnectionPool));
     _redisProfiler       = redisProfiler ?? throw new ArgumentNullException(nameof(redisProfiler));
 }
 public SingleRedisConnectionPool(IRedisProfiler profiler)
 {
     _profiler = profiler ?? throw new ArgumentNullException(nameof(profiler));
 }