mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-18 05:33:59 -05:00
Update healthMatrix.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -45,8 +45,12 @@ async function checkService(service: ServiceConfig): Promise<HealthResult> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function printMatrix(results: HealthResult[]): void {
|
function printMatrix(results: HealthResult[]): void {
|
||||||
console.log("service status url latency");
|
console.log(
|
||||||
console.log("------------------------------------------------------");
|
`${"service".padEnd(10)} ${"status".padEnd(8)} ${"url".padEnd(30)} latency`
|
||||||
|
);
|
||||||
|
console.log(
|
||||||
|
`${"-".repeat(10)} ${"-".repeat(8)} ${"-".repeat(30)} ${"-".repeat(7)}`
|
||||||
|
);
|
||||||
|
|
||||||
for (const result of results) {
|
for (const result of results) {
|
||||||
const latency = result.latencyMs !== null ? `${result.latencyMs}ms` : "--";
|
const latency = result.latencyMs !== null ? `${result.latencyMs}ms` : "--";
|
||||||
|
|||||||
Reference in New Issue
Block a user