riok / Kreya

Kreya is a GUI client for gRPC and REST APIs with innovative features for environments, authorizations and more.
https://kreya.app
290 stars 5 forks source link

Server-timing not shown on Windows? #262

Open tweidema opened 1 week ago

tweidema commented 1 week ago

Describe the bug I have implemented a gRPC service returning a server-timing header as described here: https://kreya.app/blog/kreya-1.12-whats-new/#operation-and-server-timing- On Kreya 1.15 on linux Kreya shows a Server Timing section in the Timing tab, with the fields set in the header (as shown in the link above). But on Kreya 1.15 on Windows this is not shown. Both on Linux and on Windows you can see the server-timing header under the "Header" tab for the call.

To Reproduce See above.

Expected behavior The Server Timing info to be shown in Windows version also.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (if possible, copy the information from the error dialog or the About menu):

CommonGuy commented 1 week ago

Can you test with the Kreya example project (this one: https://github.com/riok/Kreya/tree/master/example-project)?

I'm on Windows too and it works for me: grafik

tweidema commented 1 week ago

With the example-project the Server-Timings section is shown on windows as it should be. Strange. The example-project sends this server-timing header:

db;dur=53, app;dur=417.2, cache;dur=123.2, total;dur=593.4

Our own project, where it is only shown on linux (even though as I wrote it is visible in the header-tab) sends this:

gRPC;dur=27.83489227294922

Look valid to me?

CommonGuy commented 1 week ago

Yes it looks valid. If I try that header, it also works for me... Could you show a screenshot? Maybe we missed something else... What type of gRPC operation is it?

Could you also try the SayHello gRPC method of the example project? Maybe it is specific to gRPC...

tweidema commented 1 week ago

It's a simple unary gRPC call, no streaming. I will try to get the Windows-user make screenshots when she comes in, but here is what it looks like on linux (where it works fine): linux_header linux_timing

tweidema commented 1 week ago

And this is what it looks like on Windows 11 PRO 23H2 T3 T5

CommonGuy commented 1 week ago

Thanks for the quick replies, I'll try to reproduce this

CommonGuy commented 1 week ago

I was finally able to reproduce and fix this. The problem was that we parsed the duration based on the user culture. In this case, the culture was set to something that has a period as the thousand separator, which caused the number to be parsed incorrectly. The resulting duration was too large, which is why it wasn't being displayed.

The user culture should obviously not be respected in this case. The bugfix will be included in the next release

tweidema commented 6 days ago

I have been bitten by that very thing as well. Great you found it.