Skip to content

Instantly share code, notes, and snippets.

@btisdall
Created May 15, 2013 13:36
Show Gist options
  • Save btisdall/5584045 to your computer and use it in GitHub Desktop.
Save btisdall/5584045 to your computer and use it in GitHub Desktop.
def convertToSlow(line)
return <<HERE
# Time: #{line['timestamp'].strftime('%y%m%d %k:%M:%S')}
# User@Host: photobox[photobox] @ [10.52.1.9]
# Query_time: #{"%.6f" % (line['time'].to_f/1000)} \
Lock_time: 0.000000 Rows_sent: #{line['rows_sent']} \
Rows_examined: #{line['rows_read']}
SET timestamp=#{line['timestamp'].strftime('%s')};
#{line['sql']} ;
HERE
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment