Welcome to the platform team. Services send the same alert many times a second, and the alert log is unreadable. The rate limiter's API in logger/rate_limited_logger.py is agreed and stubbed out, and the rules are in REA…
Welcome to the platform team. Services send the same alert many times a second, and the alert log is unreadable. The rate limiter's API in logger/rate_limited_logger.py is agreed and stubbed out, and the rules are in README.md.
Build both levels in 25 minutes. The checks are graded one by one, so each part you get working counts even if the rest is not done.
should_print(timestamp, message) returns True the first time a message is seen and False for repeats less than 10 seconds after it was printed.t prints again from t + 10.False do not restart the wait.tracked(timestamp) returns how many messages are still inside their ten seconds.pytest tests/visible. The hidden checks include long streams.Visible test command
pytest tests/visibleThe repository’s own tests. Run all tests includes them, and so does every submission.
Repository
logger-rate-limiter-ten-second-window
Changes under src/ are evaluated.