summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/__snapshots__/ModelStatsDisplay.test.tsx.snap
blob: efc0862b5dce0467aa9f29ec31fab11a3df72bca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<ModelStatsDisplay /> > should display a single model correctly 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                  │
│  Model Stats For Nerds                                                                           │
│                                                                                                  │
│  Metric                      gemini-2.5-pro                                                      │
│  ──────────────────────────────────────────────────────────────────────────────────────────────  │
│  API                                                                                             │
│  Requests                    1                                                                   │
│  Errors                      0 (0.0%)                                                            │
│  Avg Latency                 100ms                                                               │
│                                                                                                  │
│  Tokens                                                                                          │
│  Total                       30                                                                  │
│    ↳ Prompt                  10                                                                  │
│    ↳ Cached                  5 (50.0%)                                                           │
│    ↳ Thoughts                2                                                                   │
│    ↳ Tool                    1                                                                   │
│    ↳ Output                  20                                                                  │
│                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;

exports[`<ModelStatsDisplay /> > should display conditional rows if at least one model has data 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                  │
│  Model Stats For Nerds                                                                           │
│                                                                                                  │
│  Metric                      gemini-2.5-pro        gemini-2.5-flash                              │
│  ──────────────────────────────────────────────────────────────────────────────────────────────  │
│  API                                                                                             │
│  Requests                    1                     1                                             │
│  Errors                      0 (0.0%)              0 (0.0%)                                      │
│  Avg Latency                 100ms                 50ms                                          │
│                                                                                                  │
│  Tokens                                                                                          │
│  Total                       30                    15                                            │
│    ↳ Prompt                  10                    5                                             │
│    ↳ Cached                  5 (50.0%)             0 (0.0%)                                      │
│    ↳ Thoughts                2                     0                                             │
│    ↳ Tool                    0                     3                                             │
│    ↳ Output                  20                    10                                            │
│                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;

exports[`<ModelStatsDisplay /> > should display stats for multiple models correctly 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                  │
│  Model Stats For Nerds                                                                           │
│                                                                                                  │
│  Metric                      gemini-2.5-pro        gemini-2.5-flash                              │
│  ──────────────────────────────────────────────────────────────────────────────────────────────  │
│  API                                                                                             │
│  Requests                    10                    20                                            │
│  Errors                      1 (10.0%)             2 (10.0%)                                     │
│  Avg Latency                 100ms                 25ms                                          │
│                                                                                                  │
│  Tokens                                                                                          │
│  Total                       300                   600                                           │
│    ↳ Prompt                  100                   200                                           │
│    ↳ Cached                  50 (50.0%)            100 (50.0%)                                   │
│    ↳ Thoughts                10                    20                                            │
│    ↳ Tool                    5                     10                                            │
│    ↳ Output                  200                   400                                           │
│                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;

exports[`<ModelStatsDisplay /> > should handle large values without wrapping or overlapping 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                  │
│  Model Stats For Nerds                                                                           │
│                                                                                                  │
│  Metric                      gemini-2.5-pro                                                      │
│  ──────────────────────────────────────────────────────────────────────────────────────────────  │
│  API                                                                                             │
│  Requests                    999,999,999                                                         │
│  Errors                      123,456,789 (12.3%)                                                 │
│  Avg Latency                 0ms                                                                 │
│                                                                                                  │
│  Tokens                                                                                          │
│  Total                       999,999,999                                                         │
│    ↳ Prompt                  987,654,321                                                         │
│    ↳ Cached                  123,456,789 (12.5%)                                                 │
│    ↳ Thoughts                111,111,111                                                         │
│    ↳ Tool                    222,222,222                                                         │
│    ↳ Output                  123,456,789                                                         │
│                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;

exports[`<ModelStatsDisplay /> > should not display conditional rows if no model has data for them 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                  │
│  Model Stats For Nerds                                                                           │
│                                                                                                  │
│  Metric                      gemini-2.5-pro                                                      │
│  ──────────────────────────────────────────────────────────────────────────────────────────────  │
│  API                                                                                             │
│  Requests                    1                                                                   │
│  Errors                      0 (0.0%)                                                            │
│  Avg Latency                 100ms                                                               │
│                                                                                                  │
│  Tokens                                                                                          │
│  Total                       30                                                                  │
│    ↳ Prompt                  10                                                                  │
│    ↳ Output                  20                                                                  │
│                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;

exports[`<ModelStatsDisplay /> > should render "no API calls" message when there are no active models 1`] = `
"╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                  │
│  No API calls have been made in this session.                                                    │
│                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
`;