{"id":23231314,"url":"https://github.com/aartaka/trivial-time","last_synced_at":"2026-02-14T05:31:53.357Z","repository":{"id":237313500,"uuid":"794269486","full_name":"aartaka/trivial-time","owner":"aartaka","description":"Portable timing and benchmarking for CL code [MOVED TO CODEBERG]","archived":false,"fork":false,"pushed_at":"2025-02-11T16:48:00.000Z","size":11,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-19T19:25:05.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codeberg.org/aartaka/trivial-time","language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aartaka.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-30T19:33:53.000Z","updated_at":"2025-08-22T08:45:21.000Z","dependencies_parsed_at":"2024-04-30T20:50:27.127Z","dependency_job_id":"0c122cb7-f2bd-48ad-851a-1d00400a4bde","html_url":"https://github.com/aartaka/trivial-time","commit_stats":null,"previous_names":["aartaka/trivial-time"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aartaka/trivial-time","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aartaka%2Ftrivial-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aartaka%2Ftrivial-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aartaka%2Ftrivial-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aartaka%2Ftrivial-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aartaka","download_url":"https://codeload.github.com/aartaka/trivial-time/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aartaka%2Ftrivial-time/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29438404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T05:24:35.651Z","status":"ssl_error","status_checked_at":"2026-02-14T05:24:34.830Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T02:14:16.955Z","updated_at":"2026-02-14T05:31:53.343Z","avatar_url":"https://github.com/aartaka.png","language":"Common Lisp","readme":"#+TITLE:trivial-time\n\n*Portably get timing stats for a piece of code (and benchmark it too)*\n\n~trivial-time~ allows to /portably/ get timing stats for a piece of code.\nIn most cases, the stats ~trivial-time~ provides are as rich as implementation-specific ~time~ stats.\nThe main benefits are:\n- The stats are exposed via ~with-time~ macro, so one can easily roll\n  their own ~time~ re-implementation.\n- There's ~benchmark~ macro for quick benchmarking for a piece of\n  code.\n- The format of ~time~ is prettier (at least to me) than most\n  implementation-specific ~time~ listings.\n\n* Getting Started\nClone the Git repository:\n#+begin_src sh\n  git clone --recursive https://github.com/aartaka/trivial-time ~/common-lisp/\n#+end_src\n\nAnd then load ~:trivial-time~ in the REPL:\n#+begin_src lisp\n  (asdf:load-system :trivial-time)\n  ;; or, if you use Quicklisp\n  (ql:quickload :trivial-time)\n#+end_src\n\n* Examples\n\n#+begin_src lisp\n  (time (loop for i below 1000\n              collect (make-list i)\n              finally (return 1)))\n  ;; Time spent successfully evaluating:\n  ;; (LOOP FOR I BELOW 1000 ...)\n  ;; Real time:         0.000000 seconds\n  ;; Run time (system): 0.000085 seconds\n  ;; Run time (user):   0.000857 seconds\n  ;; CPU cycles:        2,274,058\n  ;; GC time:           0.000000 seconds\n  ;; Allocated:         8,024,240 bytes\n\n  (trivial-time:with-time (\u0026key aborted gc-count gc allocated)\n      (lists lists-p)\n      (loop for i below 1000\n            collect (make-list i :initial-element :hello)\n              into lists\n            finally (return (values lists t)))\n    (unless aborted\n      (format t \"Bytes allocated: ~a, GC ran ~d times for ~a seconds\"\n              allocated gc-count gc)))\n  ;; Bytes allocated: 7997952, GC ran NIL times for 0 seconds\n\n  (trivial-time:benchmark (20) ;; Repeat count.\n    (loop for i below 1000 collect (make-list i) finally (return 1)))\n  ;; Benchmark for 20 runs of\n  ;; (LOOP FOR I BELOW 1000\n  ;;       COLLECT (MAKE-LIST I)\n  ;;       FINALLY (RETURN 1))\n  ;; -                   MINIMUM        AVERAGE        MAXIMUM        TOTAL\n  ;; REAL-TIME           0.0            0.00175        0.019          0.035\n  ;; USER-RUN-TIME       0.000668       0.0016634      0.016315       0.033268\n  ;; SYSTEM-RUN-TIME     0.0            0.00021195     0.003794       0.004239\n  ;; GC-RUN-TIME         0.0            0.00085        0.017          0.017\n  ;; BYTES-ALLOCATED     7997952.0      8008154.5      8030464.0      160163090.0\n#+end_src\n","funding_links":[],"categories":["Online editors ##"],"sub_categories":["Third-party APIs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faartaka%2Ftrivial-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faartaka%2Ftrivial-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faartaka%2Ftrivial-time/lists"}