mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
Address review feedback again
This commit is contained in:
parent
9947c92e8e
commit
71b9762501
3 changed files with 5 additions and 24 deletions
|
|
@ -2251,7 +2251,6 @@ func (e *executor) executeRowShard(ctx context.Context, index string, c *pql.Cal
|
|||
return rows[0], nil
|
||||
}
|
||||
row := rows[0].Union(rows[1:]...)
|
||||
f.Stats.Count(MetricRow, 1, 1.0)
|
||||
return row, nil
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -575,7 +575,7 @@ func (f *fragment) unprotectedSetBit(rowID, columnID uint64) (changed bool, err
|
|||
// a new copy if no one's reading it.
|
||||
f.rowCache.Add(rowID, nil)
|
||||
|
||||
f.stats.Count(MetricSetBit, 1, 0.001)
|
||||
f.stats.Count(MetricSetBit, 1, 1.0)
|
||||
|
||||
// Update row count if they have increased.
|
||||
if rowID > f.maxRowID {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ func (h grpcHandler) QueryPQL(req *pb.QueryPQLRequest, stream pb.Pilosa_QueryPQL
|
|||
Index: req.Index,
|
||||
Query: req.Pql,
|
||||
}
|
||||
statsTags := make([]string, 0, 5)
|
||||
|
||||
t := time.Now()
|
||||
resp, err := h.api.Query(context.Background(), &query)
|
||||
|
|
@ -87,16 +86,8 @@ func (h grpcHandler) QueryPQL(req *pb.QueryPQLRequest, stream pb.Pilosa_QueryPQL
|
|||
}
|
||||
}
|
||||
durFormat := time.Since(t)
|
||||
if query.Remote {
|
||||
statsTags = append(statsTags, "where:external")
|
||||
} else {
|
||||
statsTags = append(statsTags, "where:internal")
|
||||
}
|
||||
stats := h.stats.WithTags(statsTags...)
|
||||
if stats != nil {
|
||||
stats.Timing(pilosa.MetricGRPCStreamQueryDurationSeconds, durQuery, 0.1)
|
||||
stats.Timing(pilosa.MetricGRPCStreamFormatDurationSeconds, durFormat, 0.1)
|
||||
}
|
||||
h.stats.Timing(pilosa.MetricGRPCStreamQueryDurationSeconds, durQuery, 0.1)
|
||||
h.stats.Timing(pilosa.MetricGRPCStreamFormatDurationSeconds, durFormat, 0.1)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
@ -107,7 +98,6 @@ func (h grpcHandler) QueryPQLUnary(ctx context.Context, req *pb.QueryPQLRequest)
|
|||
Index: req.Index,
|
||||
Query: req.Pql,
|
||||
}
|
||||
statsTags := make([]string, 0, 5)
|
||||
|
||||
t := time.Now()
|
||||
resp, err := h.api.Query(context.Background(), &query)
|
||||
|
|
@ -131,16 +121,8 @@ func (h grpcHandler) QueryPQLUnary(ctx context.Context, req *pb.QueryPQLRequest)
|
|||
response.Rows = append(response.Rows, &pb.Row{Columns: row.Columns})
|
||||
}
|
||||
durFormat := time.Since(t)
|
||||
if query.Remote {
|
||||
statsTags = append(statsTags, "where:external")
|
||||
} else {
|
||||
statsTags = append(statsTags, "where:internal")
|
||||
}
|
||||
stats := h.stats.WithTags(statsTags...)
|
||||
if stats != nil {
|
||||
h.stats.Timing(pilosa.MetricGRPCUnaryQueryDurationSeconds, durQuery, 0.1)
|
||||
h.stats.Timing(pilosa.MetricGRPCUnaryFormatDurationSeconds, durFormat, 0.1)
|
||||
}
|
||||
h.stats.Timing(pilosa.MetricGRPCUnaryQueryDurationSeconds, durQuery, 0.1)
|
||||
h.stats.Timing(pilosa.MetricGRPCUnaryFormatDurationSeconds, durFormat, 0.1)
|
||||
|
||||
return response, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue