tessl install tessl/pypi-pyrate-limiter@3.9.0Python Rate-Limiter using Leaky-Bucket Algorithm for controlling request rates in applications with multiple backend storage options.
Agent Success
Agent success rate when using this tile
81%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.45x
Baseline
Agent success rate without this tile
56%
{
"context": "This evaluation assesses the engineer's proficiency in using PyrateLimiter's MonotonicClock for accurate timing measurements. The focus is on proper instantiation and usage of the MonotonicClock class to obtain timestamps that are immune to system clock adjustments.",
"type": "weighted_checklist",
"checklist": [
{
"name": "MonotonicClock import",
"description": "Correctly imports MonotonicClock from pyrate_limiter (e.g., 'from pyrate_limiter import MonotonicClock' or 'from pyrate_limiter.clock import MonotonicClock')",
"max_score": 15
},
{
"name": "MonotonicClock instantiation",
"description": "Creates an instance of MonotonicClock in the RequestMonitor.__init__ method (e.g., 'self.clock = MonotonicClock()')",
"max_score": 20
},
{
"name": "Timestamp capture",
"description": "Uses the MonotonicClock.now() method to capture timestamps when recording requests (e.g., 'timestamp = self.clock.now()' or 'self.timestamps.append(self.clock.now())')",
"max_score": 25
},
{
"name": "Elapsed time calculation",
"description": "Calculates elapsed time correctly using MonotonicClock timestamps by subtracting previous timestamp from current timestamp in the get_last_elapsed method",
"max_score": 20
},
{
"name": "Average interval calculation",
"description": "Calculates average interval correctly using MonotonicClock timestamps in the get_average_interval method by computing the total time span and dividing by the number of intervals",
"max_score": 20
}
]
}