Changeset 39379 in project
- Timestamp:
- 11/24/20 17:35:39 (5 months ago)
- Location:
- release/5/micro-benchmark/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
release/5/micro-benchmark/trunk/micro-benchmark.egg
r39375 r39379 1 1 ((synopsis "easily create micro-benchmarks") 2 (version "0.0. 4")2 (version "0.0.5") 3 3 (author "David Krentzlin") 4 4 (maintainer "[[kon lovett]]") … … 10 10 (extension micro-benchmark 11 11 (types-file) 12 (cond-expand 13 (linux 14 (csc-options "-lrt" "-O4" "-d0" "-disable-interrupts" "-strict-types" "-no-procedure-checks-for-toplevel-bindings")) 15 (else 16 (csc-options "-O4" "-d0" "-disable-interrupts" "-strict-types" "-no-procedure-checks-for-toplevel-bindings")) ) ) ) ) 12 (csc-options "-O4" "-d0" "-disable-interrupts" "-strict-types" "-no-procedure-checks-for-toplevel-bindings") ) ) ) -
release/5/micro-benchmark/trunk/tests/micro-benchmark-test.scm
r39356 r39379 11 11 (begin (set! saved x) x))))) 12 12 13 (define (wait-message) (gloss "Please Wait ...")) 14 13 15 (test-begin "micro-benchmark") 14 16 … … 22 24 (test-begin "micro-benchmark") 23 25 24 (test-assert (glossed *iterations-overhead*)) 25 (glossed) 26 (test-group "basic" 27 (test-assert (glossed *iterations-overhead*)) 28 (glossed) 29 ) 26 30 27 31 (test-group "examples" … … 29 33 30 34 ;simply measure the runtime of the given fragment 35 (wait-message) 31 36 (test-assert (glossed (benchmark-measure (sleep 2)))) 32 37 (glossed) 33 38 34 39 ;run code 3 times and return results 40 (wait-message) 35 41 (parameterize ((current-benchmark-iterations 3)) 36 42 (test-assert (glossed (benchmark-run (sleep 1)))) … … 38 44 39 45 ;find out how many iterations we can make per second 46 (wait-message) 40 47 (test-assert (glossed (benchmark-ips (sleep 2)))) 41 48 (glossed) … … 45 52 (current-benchmark-statistics-set #t) ) 46 53 ; 47 ( gloss "Please Wait")54 (wait-message) 48 55 (test-bigO "benchmark-measure returns runtime" 49 56 1000000.0 (benchmark-measure (busy-work) 'test)) … … 55 62 (runs 56 63 (parameterize ((current-benchmark-iterations 3)) 57 ( gloss "Please Wait")64 (wait-message) 58 65 (benchmark-measure-run (begin (busy-work) 'test)))) ) 59 66 (generate-statistics runs (current-benchmark-statistics-set)))) )
Note: See TracChangeset
for help on using the changeset viewer.