Skip to content
Snippets Groups Projects
Commit 2c1c19a3 authored by George Sedov's avatar George Sedov
Browse files

small fixes

parent d691706e
No related branches found
No related tags found
No related merge requests found
......@@ -110,7 +110,7 @@ func processRequest(w http.ResponseWriter, r *http.Request, op string, extra_par
var ansStats StatsStruct
err = json.Unmarshal(answer, &ansStats)
if err == nil {
delay := (uint64(time.Now().UnixNano()) / uint64(time.Millisecond)) - ansStats.Timestamp
delay := (uint64(time.Now().UnixNano()) - ansStats.Timestamp) / uint64(time.Millisecond)
switch op {
case "next":
fallthrough
......
......@@ -692,7 +692,7 @@ func (s *QueryServer) GetGroupDelay(ctx context.Context, query *pb.GroupDelayQue
result, err := s.dbQueryApi.Query(ctx, "from(bucket: \""+s.settings.InfluxDbDatabase+"\")"+
" |> range(start: "+startTime+", stop: "+endTime+")"+
" |> filter(fn: (r) => r._measurement == \""+dbMeasurementBrokerFileRequests+"\""+" and r.brokerCommand == \"next\")"+
" |> filter(fn: (r) => r.beamtime == \""+query.BeamtimeFilter+"\" r._field == \"delayMs\""+
" |> filter(fn: (r) => r.beamtime == \""+query.BeamtimeFilter+"\" and r._field == \"delayMs\""+
" |> group(columns: [\"groupId\"])"+
" |> last()"+
" |> keep(columns: [\"groupId\", \"_value\"])"+
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment