OpenRefine / OpenRefine/OpenRefine

Logging: the request timings being logged are wrong

Open
#5,861 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Feature Request
Dominant language
Java
Stars
12k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
27

Description

Each time you make a HTTP request to OpenRefine it logs (what I assume is) its response time:

07:39:07.484 [                   refine] GET /command/core/get-version (5019ms)

These timings does, however, not seem to work (again assuming it's response time).

To Reproduce

Steps to reproduce the behavior:

  1. Make a HTTP request to /command/core/get-version each ~five seconds
Script

#!/bin/bash

URL="http://127.0.0.1:3333/command/core/get-version"

while true; do
start_time=$(date +%s.%N)
response=$(curl -s -w "\n%{time_total}\n" -o /dev/null "$URL")
end_time=$(date +%s.%N)

response_time=$(echo "$response" | tail -n 1)
printf "Response Time: %.5f seconds\n" "$response_time"

sleep 5

done

Current Results

OpenRefine prints values around ~5000ms to the terminal / log

Expected Behavior

OpenRefine prints values that match the time it takes for a request to finish.

Screenshots

OpenRefine output next to the output of the script above:

Screenshot from 2023-05-21 07-39-26

Versions
  • Operating System: Fedora 37
  • JRE or JDK Version: 17.0.6
  • OpenRefine: 3.8/main
Additional context

I might be completely wrong assuming the intended result is for OpenRefine to print the response time but if so the output is confusing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the request logging path for the /command/core/get-version endpoint and compare its logged duration with the reproduction script's time_total value. The issue is done when the terminal or log timing matches the time taken for each request to finish.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.