You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "scholarsmate (via GitHub)" <gi...@apache.org> on 2024/03/18 14:36:08 UTC
[PR] Omega Edit status messages must be in tolerance [daffodil-vscode]
scholarsmate opened a new pull request, #993:
URL: https://github.com/apache/daffodil-vscode/pull/993
To test this, run the Data Editor from a Windows machine, hover over the green dot down where the Omega Edit status information is, and check that the CPU Load Average is now no being reported because it is not in tolerance.
Fixes CPU Load Average reports -1.0.0 in Windows.
closes #989
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Omega Edit status messages must be in tolerance [daffodil-vscode]
Posted by "scholarsmate (via GitHub)" <gi...@apache.org>.
scholarsmate commented on PR #993:
URL: https://github.com/apache/daffodil-vscode/pull/993#issuecomment-2012450907
@stricklandrbls, that is the expected behavior. If a measurement is not in tolerance, it doesn't get reported at all. Not sure why the Windows JVM can't properly report the average CPU load, but if that ever does get repaired, then it will be properly reported in the metrics at that time without any changes to this code.
@rthomas320, perhaps that's happening because this branch needs to be rebased to incorporate any recent updates and fixes. If that's the case, I'll do a rebase and force push it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Omega Edit status messages must be in tolerance [daffodil-vscode]
Posted by "hdalsania (via GitHub)" <gi...@apache.org>.
hdalsania commented on code in PR #993:
URL: https://github.com/apache/daffodil-vscode/pull/993#discussion_r1534119723
##########
src/svelte/src/components/ServerMetrics/ServerMetrics.svelte:
##########
@@ -107,32 +107,49 @@ limitations under the License.
on:mouseenter={() => showHeartbeatInfo(true)}
on:mouseleave={() => showHeartbeatInfo(false)}
>
- {#if heartbeat.latency < 20}
+ {#if 0 < heartbeat.latency && heartbeat.latency < 20}
<circle cx="50%" cy="50%" r="4pt" fill="green" />
- {:else if heartbeat.latency < 40}
+ {:else if 0 < heartbeat.latency && heartbeat.latency < 40}
<circle cx="50%" cy="50%" r="4pt" fill="yellow" />
- {:else if heartbeat.latency > 60}
+ {:else if 0 < heartbeat.latency && heartbeat.latency > 60}
<circle cx="50%" cy="50%" r="4pt" fill="red" />
{:else}
<circle cx="50%" cy="50%" r="4pt" fill="grey" />
{/if}
</svg>
<div class="heartbeat-info">
- <b>Latency:</b>
- {heartbeat.latency}ms,
- <b>CPU Load Avg:</b>
- {(heartbeat.serverCpuLoadAverage
- ? heartbeat.serverCpuLoadAverage
- : 0
- ).toFixed(2)},
- <b>Memory Usage:</b>
- {heartbeat.serverUsedMemory},
- <b>Session Count:</b>
- {heartbeat.sessionCount},
- <b>Uptime:</b>
- {prettyPrintUptime(heartbeat.serverUptime)}
- <b>JVM Version:</b>
- {heartbeat.jvmVersion}
+ {#if heartbeat.latency > 0}
+ <b>Latency:</b>
+ {heartbeat.latency}ms,
+ {/if}
+ {#if heartbeat.serverUptime > 0}
+ <b>Uptime:</b>
+ {prettyPrintUptime(heartbeat.serverUptime)}
+ {/if}
+ {#if heartbeat.sessionCount > 0}
+ <b>Session Count:</b>
+ {heartbeat.sessionCount},
+ {/if}
+ {#if heartbeat.serverCpuLoadAverage > 0}
Review Comment:
Because of this change, windows does not display CPU Load Avg. at all because it is not >0?
Windows:

Linux:

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Omega Edit status messages must be in tolerance [daffodil-vscode]
Posted by "scholarsmate (via GitHub)" <gi...@apache.org>.
scholarsmate commented on PR #993:
URL: https://github.com/apache/daffodil-vscode/pull/993#issuecomment-2012474592
@rthomas320, the branch is currently up-to-date with main. Can you please try again? Be sure to run `git clean -fdx` before the build to make sure it's clean.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Omega Edit status messages must be in tolerance [daffodil-vscode]
Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on code in PR #993:
URL: https://github.com/apache/daffodil-vscode/pull/993#discussion_r1534177234
##########
src/svelte/src/components/ServerMetrics/ServerMetrics.svelte:
##########
@@ -107,32 +107,49 @@ limitations under the License.
on:mouseenter={() => showHeartbeatInfo(true)}
on:mouseleave={() => showHeartbeatInfo(false)}
>
- {#if heartbeat.latency < 20}
+ {#if 0 < heartbeat.latency && heartbeat.latency < 20}
<circle cx="50%" cy="50%" r="4pt" fill="green" />
- {:else if heartbeat.latency < 40}
+ {:else if 0 < heartbeat.latency && heartbeat.latency < 40}
<circle cx="50%" cy="50%" r="4pt" fill="yellow" />
- {:else if heartbeat.latency > 60}
+ {:else if 0 < heartbeat.latency && heartbeat.latency > 60}
<circle cx="50%" cy="50%" r="4pt" fill="red" />
{:else}
<circle cx="50%" cy="50%" r="4pt" fill="grey" />
{/if}
</svg>
<div class="heartbeat-info">
- <b>Latency:</b>
- {heartbeat.latency}ms,
- <b>CPU Load Avg:</b>
- {(heartbeat.serverCpuLoadAverage
- ? heartbeat.serverCpuLoadAverage
- : 0
- ).toFixed(2)},
- <b>Memory Usage:</b>
- {heartbeat.serverUsedMemory},
- <b>Session Count:</b>
- {heartbeat.sessionCount},
- <b>Uptime:</b>
- {prettyPrintUptime(heartbeat.serverUptime)}
- <b>JVM Version:</b>
- {heartbeat.jvmVersion}
+ {#if heartbeat.latency > 0}
+ <b>Latency:</b>
+ {heartbeat.latency}ms,
+ {/if}
+ {#if heartbeat.serverUptime > 0}
+ <b>Uptime:</b>
+ {prettyPrintUptime(heartbeat.serverUptime)}
+ {/if}
+ {#if heartbeat.sessionCount > 0}
+ <b>Session Count:</b>
+ {heartbeat.sessionCount},
+ {/if}
+ {#if heartbeat.serverCpuLoadAverage > 0}
Review Comment:
> I wanted to avoid placeholders simply due to (lack of) real estate.
Using `humanReadableByteLength(byteLength: number): string ` from `./src/svelte/src/utilities/display.ts` on the "Memory Usage" value might help with the real estate. I'm be fine approving this PR with omitting the `CPULoadAverage` value for Windows and possibly creating another ticket for restructuring the way server information is output.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Omega Edit status messages must be in tolerance [daffodil-vscode]
Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on PR #993:
URL: https://github.com/apache/daffodil-vscode/pull/993#issuecomment-2012531895
@scholarsmate
I retested the PR with the main rebase and it still works as expected.
---
> ... If a measurement is not in tolerance, it doesn't get reported at all ...
I'm wondering if we should have a placeholder for this in the output instead of just omitting it entirely.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Omega Edit status messages must be in tolerance [daffodil-vscode]
Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on PR #993:
URL: https://github.com/apache/daffodil-vscode/pull/993#issuecomment-2009621017
> check that the CPU Load Average is now no being reported because it is not in tolerance.
Is that supposed to say "_not_ being reported"? Running this PR as described but I don't see the `CPULoadAverage` from this section:
https://github.com/apache/daffodil-vscode/blob/4b09ed25b80d6c9f7cd1a811c0aa68871e1b6407/src/svelte/src/components/ServerMetrics/ServerMetrics.svelte#L133-L136
**Screenshot Reference**

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Omega Edit status messages must be in tolerance [daffodil-vscode]
Posted by "scholarsmate (via GitHub)" <gi...@apache.org>.
scholarsmate merged PR #993:
URL: https://github.com/apache/daffodil-vscode/pull/993
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Omega Edit status messages must be in tolerance [daffodil-vscode]
Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on code in PR #993:
URL: https://github.com/apache/daffodil-vscode/pull/993#discussion_r1534177234
##########
src/svelte/src/components/ServerMetrics/ServerMetrics.svelte:
##########
@@ -107,32 +107,49 @@ limitations under the License.
on:mouseenter={() => showHeartbeatInfo(true)}
on:mouseleave={() => showHeartbeatInfo(false)}
>
- {#if heartbeat.latency < 20}
+ {#if 0 < heartbeat.latency && heartbeat.latency < 20}
<circle cx="50%" cy="50%" r="4pt" fill="green" />
- {:else if heartbeat.latency < 40}
+ {:else if 0 < heartbeat.latency && heartbeat.latency < 40}
<circle cx="50%" cy="50%" r="4pt" fill="yellow" />
- {:else if heartbeat.latency > 60}
+ {:else if 0 < heartbeat.latency && heartbeat.latency > 60}
<circle cx="50%" cy="50%" r="4pt" fill="red" />
{:else}
<circle cx="50%" cy="50%" r="4pt" fill="grey" />
{/if}
</svg>
<div class="heartbeat-info">
- <b>Latency:</b>
- {heartbeat.latency}ms,
- <b>CPU Load Avg:</b>
- {(heartbeat.serverCpuLoadAverage
- ? heartbeat.serverCpuLoadAverage
- : 0
- ).toFixed(2)},
- <b>Memory Usage:</b>
- {heartbeat.serverUsedMemory},
- <b>Session Count:</b>
- {heartbeat.sessionCount},
- <b>Uptime:</b>
- {prettyPrintUptime(heartbeat.serverUptime)}
- <b>JVM Version:</b>
- {heartbeat.jvmVersion}
+ {#if heartbeat.latency > 0}
+ <b>Latency:</b>
+ {heartbeat.latency}ms,
+ {/if}
+ {#if heartbeat.serverUptime > 0}
+ <b>Uptime:</b>
+ {prettyPrintUptime(heartbeat.serverUptime)}
+ {/if}
+ {#if heartbeat.sessionCount > 0}
+ <b>Session Count:</b>
+ {heartbeat.sessionCount},
+ {/if}
+ {#if heartbeat.serverCpuLoadAverage > 0}
Review Comment:
> I wanted to avoid placeholders simply due to (lack of) real estate.
The using `humanReadableByteLength(byteLength: number): string ` from `./src/svelte/src/utilities/display.ts` on the "Memory Usage" value might help with the real estate. I'm be fine approving this PR with omitting the `CPULoadAverage` value for Windows and possibly creating another ticket for restructuring the way server information is output.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Omega Edit status messages must be in tolerance [daffodil-vscode]
Posted by "scholarsmate (via GitHub)" <gi...@apache.org>.
scholarsmate commented on code in PR #993:
URL: https://github.com/apache/daffodil-vscode/pull/993#discussion_r1534150044
##########
src/svelte/src/components/ServerMetrics/ServerMetrics.svelte:
##########
@@ -107,32 +107,49 @@ limitations under the License.
on:mouseenter={() => showHeartbeatInfo(true)}
on:mouseleave={() => showHeartbeatInfo(false)}
>
- {#if heartbeat.latency < 20}
+ {#if 0 < heartbeat.latency && heartbeat.latency < 20}
<circle cx="50%" cy="50%" r="4pt" fill="green" />
- {:else if heartbeat.latency < 40}
+ {:else if 0 < heartbeat.latency && heartbeat.latency < 40}
<circle cx="50%" cy="50%" r="4pt" fill="yellow" />
- {:else if heartbeat.latency > 60}
+ {:else if 0 < heartbeat.latency && heartbeat.latency > 60}
<circle cx="50%" cy="50%" r="4pt" fill="red" />
{:else}
<circle cx="50%" cy="50%" r="4pt" fill="grey" />
{/if}
</svg>
<div class="heartbeat-info">
- <b>Latency:</b>
- {heartbeat.latency}ms,
- <b>CPU Load Avg:</b>
- {(heartbeat.serverCpuLoadAverage
- ? heartbeat.serverCpuLoadAverage
- : 0
- ).toFixed(2)},
- <b>Memory Usage:</b>
- {heartbeat.serverUsedMemory},
- <b>Session Count:</b>
- {heartbeat.sessionCount},
- <b>Uptime:</b>
- {prettyPrintUptime(heartbeat.serverUptime)}
- <b>JVM Version:</b>
- {heartbeat.jvmVersion}
+ {#if heartbeat.latency > 0}
+ <b>Latency:</b>
+ {heartbeat.latency}ms,
+ {/if}
+ {#if heartbeat.serverUptime > 0}
+ <b>Uptime:</b>
+ {prettyPrintUptime(heartbeat.serverUptime)}
+ {/if}
+ {#if heartbeat.sessionCount > 0}
+ <b>Session Count:</b>
+ {heartbeat.sessionCount},
+ {/if}
+ {#if heartbeat.serverCpuLoadAverage > 0}
Review Comment:
Correct, you and @stricklandrbls said the same. I wanted to avoid placeholders simply due to (lack of) real estate.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org