Spaces:
Runtime error
Runtime error
Emoji for list command
Browse files- client/src/index.ts +19 -3
client/src/index.ts
CHANGED
|
@@ -201,7 +201,7 @@ yargs(hideBin(process.argv))
|
|
| 201 |
console.log(`Total benchmarks: ${result.total}\n`);
|
| 202 |
|
| 203 |
const data = [
|
| 204 |
-
["ID", "Status", "Platform", "Model", "Task", "Mode", "Repeats", "Batch", "DType", "Device", "Browser", "Duration"],
|
| 205 |
];
|
| 206 |
|
| 207 |
result.results.forEach((b: any) => {
|
|
@@ -209,10 +209,25 @@ yargs(hideBin(process.argv))
|
|
| 209 |
? `${((b.completedAt - b.startedAt) / 1000).toFixed(1)}s`
|
| 210 |
: "-";
|
| 211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
data.push([
|
| 213 |
b.id.substring(0, 8),
|
| 214 |
-
|
| 215 |
-
|
| 216 |
b.modelId,
|
| 217 |
b.task,
|
| 218 |
b.mode,
|
|
@@ -221,6 +236,7 @@ yargs(hideBin(process.argv))
|
|
| 221 |
b.dtype || "-",
|
| 222 |
b.device || "-",
|
| 223 |
b.browser || "-",
|
|
|
|
| 224 |
duration,
|
| 225 |
]);
|
| 226 |
});
|
|
|
|
| 201 |
console.log(`Total benchmarks: ${result.total}\n`);
|
| 202 |
|
| 203 |
const data = [
|
| 204 |
+
["ID", "Status", "Platform", "Model", "Task", "Mode", "Repeats", "Batch", "DType", "Device", "Browser", "Headed", "Duration"],
|
| 205 |
];
|
| 206 |
|
| 207 |
result.results.forEach((b: any) => {
|
|
|
|
| 209 |
? `${((b.completedAt - b.startedAt) / 1000).toFixed(1)}s`
|
| 210 |
: "-";
|
| 211 |
|
| 212 |
+
// Status with emoji
|
| 213 |
+
const statusMap: Record<string, string> = {
|
| 214 |
+
completed: "β
completed",
|
| 215 |
+
failed: "β failed",
|
| 216 |
+
running: "π running",
|
| 217 |
+
pending: "β³ pending",
|
| 218 |
+
};
|
| 219 |
+
const statusDisplay = statusMap[b.status] || b.status;
|
| 220 |
+
|
| 221 |
+
// Platform with emoji
|
| 222 |
+
const platformDisplay = b.platform === "node" ? "π’ node" : "π web";
|
| 223 |
+
|
| 224 |
+
// Headed with emoji
|
| 225 |
+
const headedDisplay = b.headed ? "ποΈ Yes" : "No";
|
| 226 |
+
|
| 227 |
data.push([
|
| 228 |
b.id.substring(0, 8),
|
| 229 |
+
statusDisplay,
|
| 230 |
+
platformDisplay,
|
| 231 |
b.modelId,
|
| 232 |
b.task,
|
| 233 |
b.mode,
|
|
|
|
| 236 |
b.dtype || "-",
|
| 237 |
b.device || "-",
|
| 238 |
b.browser || "-",
|
| 239 |
+
headedDisplay,
|
| 240 |
duration,
|
| 241 |
]);
|
| 242 |
});
|