Skip to content

Commit

Permalink
Merge pull request #16 from coreplatform/aradhyasharma/dap-5087
Browse files Browse the repository at this point in the history
[PATCH][DAP-5087] add per table counter to keep track of sqlite lookups
  • Loading branch information
aradhya-sharma-etsy authored and GitHub Enterprise committed Jul 20, 2023
2 parents 975cf98 + 8936459 commit 6be5cdd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions go/vt/vtgate/vindexes/sqlite_lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ var (

// Metrics
timings = stats.NewTimings("SqliteLookupTimings", "Sqlite lookup timings", "operation")
counter = stats.NewCountersWithSingleLabel("SqliteLookupCounter", "Sqlite lookup counts by table", "table")
)

func init() {
Expand Down Expand Up @@ -239,6 +240,7 @@ func (slu *SqliteLookupUnique) retrieveIDKsidMap(ids []sqltypes.Value) (resultMa
}

timings.Record(queryTimingKey, queryStart)
counter.Add(slu.table, 1)

return resultMap, err
}
Expand Down

0 comments on commit 6be5cdd

Please sign in to comment.