ducklm/scripts/bench/bench_runtime.py

35 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import asyncio
import time
from duck_core.model_client import ModelClient
TASKS = [
"Скажи коротко, что ты DuckLM.",
"Создай tmp/duck_test_note.md с текстом hello duck и прочитай его обратно.",
"Посмотри структуру проекта и кратко опиши модули.",
"Найди TODO/FIXME в проекте.",
"Запусти тесты и кратко объясни результат.",
]
async def main() -> None:
client = ModelClient()
print("role -> base_url/model")
for role, cfg in client._roles.items():
print(f"{role} -> {cfg.base_url}/{cfg.model}")
started = time.perf_counter()
print(f"test_tasks={len(TASKS)}")
print("llm_calls=0")
print("tool_calls=0")
print("json_directive_validity=not_run")
print("retry_count=0")
print("memory_writes=0")
print("experience_record_created=no")
print("selected_skill=not_run")
print(f"total_runtime_seconds={time.perf_counter() - started:.3f}")
if __name__ == "__main__":
asyncio.run(main())