Sha256: d86884245e1a9dd91166ff16bbc7a11981efe34da6f1da6a98d508a97940e6bf
Contents?: true
Size: 506 Bytes
Versions: 9
Compression:
Stored size: 506 Bytes
Contents
module Dexter class PgStatActivityParser < LogParser def perform queries = {} loop do new_queries = {} @logfile.stat_activity.each do |row| new_queries[row["id"]] = row end # store queries after they complete queries.each do |id, row| unless new_queries[id] process_entry(row["query"], row["duration_ms"].to_f) end end queries = new_queries sleep(1) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems