@@ -56,7 +56,7 @@ func TestPrefixPlugin(t *testing.T) {
56
56
assert .Equal (t , float64 (0 ), scores [pod2 ], "score for pod2" )
57
57
58
58
// Simulate pod1 was picked.
59
- plugin .PostCycle (context .Background (), cycleState1 , & types.Result {TargetPod : pod1 })
59
+ plugin .PostCycle (context .Background (), cycleState1 , & types.ProfileRunResult {TargetPod : pod1 })
60
60
61
61
// Second request doesn't share any prefix with first one. It should be added to the cache but
62
62
// the pod score should be 0.
@@ -77,7 +77,7 @@ func TestPrefixPlugin(t *testing.T) {
77
77
assert .Equal (t , float64 (0 ), scores [pod2 ], "score for pod2" )
78
78
79
79
// Simulate pod2 was picked.
80
- plugin .PostCycle (context .Background (), cycleState2 , & types.Result {TargetPod : pod2 })
80
+ plugin .PostCycle (context .Background (), cycleState2 , & types.ProfileRunResult {TargetPod : pod2 })
81
81
82
82
// Third request shares partial prefix with first one.
83
83
req3 := & types.LLMRequest {
@@ -96,7 +96,7 @@ func TestPrefixPlugin(t *testing.T) {
96
96
assert .Equal (t , float64 (2 )/ float64 (3 ), scores [pod1 ], "score should be 2/3 - the model and the first prefix block match" )
97
97
assert .Equal (t , float64 (0 ), scores [pod2 ], "score for pod2" )
98
98
99
- plugin .PostCycle (context .Background (), cycleState3 , & types.Result {TargetPod : pod1 })
99
+ plugin .PostCycle (context .Background (), cycleState3 , & types.ProfileRunResult {TargetPod : pod1 })
100
100
101
101
// 4th request is same as req3 except the model is different, still no match.
102
102
req4 := & types.LLMRequest {
@@ -115,7 +115,7 @@ func TestPrefixPlugin(t *testing.T) {
115
115
assert .Equal (t , float64 (0 ), scores [pod1 ], "score for pod1" )
116
116
assert .Equal (t , float64 (0 ), scores [pod2 ], "score for pod2" )
117
117
118
- plugin .PostCycle (context .Background (), cycleState4 , & types.Result {TargetPod : pod1 })
118
+ plugin .PostCycle (context .Background (), cycleState4 , & types.ProfileRunResult {TargetPod : pod1 })
119
119
120
120
// 5th request shares partial prefix with 3rd one.
121
121
req5 := & types.LLMRequest {
@@ -134,5 +134,5 @@ func TestPrefixPlugin(t *testing.T) {
134
134
assert .Equal (t , 0.75 , scores [pod1 ], "score should be 0.75 - the model and the first 2 prefix blocks match" )
135
135
assert .Equal (t , float64 (0 ), scores [pod2 ], "score for pod2" )
136
136
137
- plugin .PostCycle (context .Background (), cycleState5 , & types.Result {TargetPod : pod1 })
137
+ plugin .PostCycle (context .Background (), cycleState5 , & types.ProfileRunResult {TargetPod : pod1 })
138
138
}
0 commit comments