Sha256: 9491e46e7e2208ce6a6f473328f8e2e5da6c0b6e69cf61c36904a94b88df9b09
Contents?: true
Size: 529 Bytes
Versions: 1
Compression:
Stored size: 529 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 break if once sleep(1) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pgdexter-0.4.3 | lib/dexter/pg_stat_activity_parser.rb |