Sha256: 204b02e3c6290e8050209b95c451376051a4092563713748042b22b23f1df4c2
Contents?: true
Size: 506 Bytes
Versions: 1
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(5) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pgdexter-0.3.4 | lib/dexter/pg_stat_activity_parser.rb |