mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
Merge pull request #835 from travisturner/port-vdsm-metrics
Port over VDSM metrics
This commit is contained in:
commit
a0db828701
2 changed files with 5 additions and 0 deletions
|
|
@ -67,4 +67,6 @@ const (
|
|||
MetricExclusiveTransactionActive = "transaction_exclusive_active"
|
||||
MetricExclusiveTransactionEnd = "trasaction_exclusive_end"
|
||||
MetricExclusiveTransactionBlocked = "transaction_exclusive_blocked"
|
||||
MetricPqlQueries = "pql_queries_total"
|
||||
MetricSqlQueries = "sql_queries_total"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ func (h *GRPCHandler) DeleteVDS(ctx context.Context, req *pb.DeleteVDSRequest) (
|
|||
}
|
||||
|
||||
func (h *GRPCHandler) execSQL(ctx context.Context, queryStr string) (pb.ToRowser, error) {
|
||||
h.stats.Count(pilosa.MetricSqlQueries, 1, 1)
|
||||
return execSQL(ctx, h.api, h.logger, queryStr)
|
||||
}
|
||||
|
||||
|
|
@ -243,6 +244,7 @@ func (h *GRPCHandler) QueryPQL(req *pb.QueryPQLRequest, stream pb.Pilosa_QueryPQ
|
|||
durFormat := time.Since(t)
|
||||
h.stats.Timing(pilosa.MetricGRPCStreamQueryDurationSeconds, durQuery, 0.1)
|
||||
h.stats.Timing(pilosa.MetricGRPCStreamFormatDurationSeconds, durFormat, 0.1)
|
||||
h.stats.Count(pilosa.MetricPqlQueries, 1, 1)
|
||||
|
||||
return errToStatusError(nil)
|
||||
}
|
||||
|
|
@ -284,6 +286,7 @@ func (h *GRPCHandler) QueryPQLUnary(ctx context.Context, req *pb.QueryPQLRequest
|
|||
|
||||
h.stats.Timing(pilosa.MetricGRPCUnaryQueryDurationSeconds, durQuery, 0.1)
|
||||
h.stats.Timing(pilosa.MetricGRPCUnaryFormatDurationSeconds, durFormat, 0.1)
|
||||
h.stats.Count(pilosa.MetricPqlQueries, 1, 1)
|
||||
|
||||
return table, errToStatusError(nil)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue