Created
December 17, 2014 20:17
-
-
Save slemiere/7abd9475874e77010b50 to your computer and use it in GitHub Desktop.
redis nice slow log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = Redis.new(url: 'redis://foo:bar@foo.com:123') | |
queries = r.slowlog('get', 1000) | |
puts queries.map{|q| "#{Time.at(q[1])} - #{q[2]/1000}ms - #{q[4].first} : #{q[4][1..-1]}"}.join("\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment