Skip to content

Commit

Permalink
fix styling for travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
zinefer committed May 15, 2018
1 parent c516a4f commit 5bcb9ce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions metricbeat/module/postgresql/statements/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
c "github.com/elastic/beats/libbeat/common/schema/mapstrstr"
)

// Based on: https://www.postgresql.org/docs/9.6/static/pgstatstatements.html
// Based on: https://www.postgresql.org/docs/9.2/static/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW
var schema = s.Schema{
"user": s.Object{
"id": c.Int("userid"),
Expand All @@ -14,32 +14,32 @@ var schema = s.Schema{
"oid": c.Int("dbid"),
},
"query": s.Object{
"id": c.Str("queryid"),
"text": c.Str("query"),
"calls": c.Int("datid"),
"rows": c.Int("rows"),
"id": c.Str("queryid"),
"text": c.Str("query"),
"calls": c.Int("calls"),
"rows": c.Int("rows"),
"time": s.Object{
"total": s.Object{"ms": c.Float("total_time")},
"min": s.Object{"ms": c.Float("min_time")},
"max": s.Object{"ms": c.Float("max_time")},
"mean": s.Object{"ms": c.Float("mean_time")},
"total": s.Object{"ms": c.Float("total_time")},
"min": s.Object{"ms": c.Float("min_time")},
"max": s.Object{"ms": c.Float("max_time")},
"mean": s.Object{"ms": c.Float("mean_time")},
"stddev": s.Object{"ms": c.Float("stddev_time")},
},
"memory": s.Object{
"shared": s.Object{
"hit": c.Int("shared_blks_hit"),
"read": c.Int("shared_blks_read"),
"hit": c.Int("shared_blks_hit"),
"read": c.Int("shared_blks_read"),
"dirtied": c.Int("shared_blks_dirtied"),
"written": c.Int("shared_blks_written"),
},
"local": s.Object{
"hit": c.Int("local_blks_hit"),
"read": c.Int("local_blks_read"),
"hit": c.Int("local_blks_hit"),
"read": c.Int("local_blks_read"),
"dirtied": c.Int("local_blks_dirtied"),
"written": c.Int("local_blks_written"),
},
"temp": s.Object{
"read": c.Int("temp_blks_read"),
"read": c.Int("temp_blks_read"),
"written": c.Int("temp_blks_written"),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func TestFetch(t *testing.T) {
assert.Contains(t, event["user"].(common.MapStr), "id")

assert.Contains(t, event, "database")
dbOid := event["database"].(common.MapStr)["oid"].(int64)
assert.True(t, dbOid > 0)
db_oid := event["database"].(common.MapStr)["oid"].(int64)
assert.True(t, db_oid > 0)

assert.Contains(t, event, "query")
query := event["query"].(common.MapStr)
Expand Down

0 comments on commit 5bcb9ce

Please sign in to comment.