feat: add role-specific statistics to telemetry and UI (cont. #15234) (#18824)

Co-authored-by: Yuna Seol <yunaseol@google.com>
This commit is contained in:
Yuna Seol
2026-02-17 12:32:30 -05:00
committed by GitHub
parent 14aabbbe8b
commit 8aca3068cf
51 changed files with 826 additions and 20 deletions

View File

@@ -29,6 +29,7 @@ describe('calculateErrorRate', () => {
thoughts: 0,
tool: 0,
},
roles: {},
};
expect(calculateErrorRate(metrics)).toBe(0);
});
@@ -45,6 +46,7 @@ describe('calculateErrorRate', () => {
thoughts: 0,
tool: 0,
},
roles: {},
};
expect(calculateErrorRate(metrics)).toBe(20);
});
@@ -63,6 +65,7 @@ describe('calculateAverageLatency', () => {
thoughts: 0,
tool: 0,
},
roles: {},
};
expect(calculateAverageLatency(metrics)).toBe(0);
});
@@ -79,6 +82,7 @@ describe('calculateAverageLatency', () => {
thoughts: 0,
tool: 0,
},
roles: {},
};
expect(calculateAverageLatency(metrics)).toBe(150);
});
@@ -97,6 +101,7 @@ describe('calculateCacheHitRate', () => {
thoughts: 0,
tool: 0,
},
roles: {},
};
expect(calculateCacheHitRate(metrics)).toBe(0);
});
@@ -113,6 +118,7 @@ describe('calculateCacheHitRate', () => {
thoughts: 0,
tool: 0,
},
roles: {},
};
expect(calculateCacheHitRate(metrics)).toBe(25);
});
@@ -170,6 +176,7 @@ describe('computeSessionStats', () => {
thoughts: 0,
tool: 0,
},
roles: {},
},
},
tools: {
@@ -209,6 +216,7 @@ describe('computeSessionStats', () => {
thoughts: 0,
tool: 0,
},
roles: {},
},
},
tools: {