gamenet / redis-memory-analyzer

Redis memory profiler to find the RAM bottlenecks throw scaning key space in real time and aggregate RAM usage statistic by patterns.
MIT License
772 stars 80 forks source link

ValueError: min() arg is an empty sequence #57

Open yjwong opened 3 years ago

yjwong commented 3 years ago

This looks similar to #23 and #29 but in a different location.

Python version 3.9.2 Redis version 6.0.8

/ # rma -b ram -s redis-master.production                   [12/57307]
Match *: 100%|██████████████▉| 55430/55447 [00:01<00:00, 34761.63it/s]
Aggregating keys by pattern and type                                                                                                        Apply rules
Processing Set patterns:   0%|                  | 0/6 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/usr/local/bin/rma", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/rma/cli/rma_cli.py", line 105, in main
    app.run()
  File "/usr/local/lib/python3.9/site-packages/rma/application.py", line 143, in run
    str_res.append(self.do_ram(keys))
  File "/usr/local/lib/python3.9/site-packages/rma/application.py", line 176, in do_ram
    ret[redis_type] = rule.analyze(keys=aggregate_patterns, total=total_keys)
  File "/usr/local/lib/python3.9/site-packages/rma/rule/Set.py", line 90, in analyze
    agg = SetAggregator(progress_iterator((SetStatEntry(x, self.redis) for x in data), progress), len(data))
  File "/usr/local/lib/python3.9/site-packages/rma/rule/Set.py", line 59, in __init__
    self.ttlMin = min(ttls)
ValueError: min() arg is an empty sequence