Skip to content

Instantly share code, notes, and snippets.

@raj454raj
Created November 1, 2019 08:21
Show Gist options
  • Save raj454raj/e325aba37fae6369122b6af3b147caf2 to your computer and use it in GitHub Desktop.
Save raj454raj/e325aba37fae6369122b6af3b147caf2 to your computer and use it in GitHub Desktop.
res = DEFAULT_REDIS_CLIENT.slowlog("GET", 128)
puts "Timestamp,Command,Time taken (in seconds)"
res.each do |one_list_item|
puts "\"#{Time.at(one_list_item[1])}\",\"#{one_list_item[3].join(' ')}\",#{one_list_item[2]*1.0/1000000}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment