## 4 Experiments and Analysis
### Comparative Analysis of Average Latency  
A comparison of the average latency of the classic token bucket algorithm and the adaptive method is conducted under the simple task scenarios, where the rate of the classic token bucket algorithm is set to the optimal fill rate mentioned above, i.e., 200 tokens/s. Figure 5: Detection of optimal token fill rate for general task scenarios. Figure 6: Detection of optimal token fill rate for complex task scenarios. From Figure 7, the following can be observed: (1) as the task concurrency increases, the average latency of both methods increases approximately linearly, which aligns with the principle that larger task volumes lead to longer processing times; (2) in most experimental groups, especially under high-concurrency conditions, the proposed method exhibits a lower average latency compared to the classic token bucket algorithm operating at its optimal rate; (3) the discrepancy in average latency between the classic token bucket algorithm and the proposed method becomes more pronounced as task concurrency increases. At the concurrency level of 185, the gap is the largest and the average latency of the classic token bucket algorithm is 1.37 times that of the proposed method, indicating that the proposed method effectively reduces the average latency for simple tasks. For the general task scenarios, the rate of the classic token bucket algorithm is set to the aforementioned optimal fill rate, i.e., 100 tokens/s. From Figure 8, the following can be observed: (1) as the task concurrency increases, the average latency of both methods increases approximately linearly; (2) in all experimental groups, the average latency of the proposed method is almost identical to that of the classic token bucket algorithm, indicating that the fixed optimal fill rate works well for handling tasks in this scenario. The performance of the proposed algorithm is only 1.7% lower than that of the classic algorithm operating at its optimal fixed rate, demonstrating a very close performance between the two methods. This indicates that the adaptive token bucket algorithm introduced in this paper maintains excellent performance when handling general tasks. Under the complex task scenarios, the rate of the classic token bucket algorithm is set to the aforementioned optimal fill rate, i.e., 50 tokens/s. From Figure 9, the following can be observed: (1) As the task concurrency increases, the average latency of both methods no longer increases linearly. When the concurrency exceeds 120, the growth curve becomes jitter, indicating that adjusting the token bucket fill rate is more challenging in complex  
Figure 8: Average latency for general task scenarios. Figure 7: Average latency for simple task scenarios. task scenarios. (2) When the concurrency is below 120, the average latency of the proposed method is almost identical to that of the classic token bucket algorithm with the optimal fill rate, suggesting that at this level of concurrency, the system load does not significantly affect the processing time. (3) When the concurrency exceeds 120, the average latency of the classic token bucket algorithm becomes higher than that of the proposed method, with the maximum difference reaching 1.05 times, indicating that the proposed method reduces the average processing latency for complex tasks. A comparison of the average latency of the two methods is also conducted under the mixed task scenarios, and the rate of the classic token bucket algorithm is set to the fixed fill rate, i.e., 150 tokens/s (between the optimal rate for general scenarios and the optimal rate for simple scenarios).