microsoft / vscode-spring-boot-dashboard

Spring Boot Dashboard for VS Code
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-spring-boot-dashboard
Other
56 stars 31 forks source link

Inaccurate x-pos for data points when you change interval of polling memory metrics #246

Open Eskibear opened 1 year ago

Eskibear commented 1 year ago
    Found a graph issue with how you plot it.

The x-axis is not correctly scaled after I change settings for polling inteval. Below is the case I change it: 5000 --(at 9:45:19)-> 1000 --(at 9:45:24)-> 5000.

image

Originally posted by @Eskibear in https://github.com/microsoft/vscode-spring-boot-dashboard/issues/242#issuecomment-1317941050

Eskibear commented 1 year ago

@vudayani-vmw

vudayani commented 1 year ago

@Eskibear In the current implementation, the fetching and plotting of metrics happen separately at the defined interval. In the above example, the first four points are plotted at 5000ms intervals (default setting). I am assuming you are changing the interval from 5000 to 1000 at (9:45:19) which plots the graph every 1sec. At 9:45:24, the interval is changed to 5000 which plots the graph every 5 secs from there on. Not sure if I understand the scenario correctly. Could you please elaborate on this?

Since the metrics are fetched and plotted independently, there might be a situation where the fetch call is triggered while the changes to the settings are propagated (clearing the timeout and setting the new interval). During this interval, data is fetched from both calls and plotted.

Eskibear commented 1 year ago

It's all about the plotting.

Let's use * to represent the data point, and - to represent their distance in X-axis. When I change the interval from 5s to 1s and then back to 5s,

Current the graph looks like:

*-----*-----*-----*-----*-----*-----*

What I would expect is:

*-----*-----*-*-*-*-----*-----*

But anyway, given the fact that it only occurs immediately after you change intervals, I don't think it's a high-priority action to take, more like a nice-to-have improvement.