File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ #lang racket/base
2+
3+ (require rackunit)
4+ (require racket/system
5+ racket/port
6+ math/statistics)
7+
8+ (define (get-total-time profiling-command)
9+ (string->number (car (regexp-match #rx"[0-9]+ " (car (regexp-match #rx"/[0-9]+ ms " (with-output-to-string (lambda () (system profiling-command)))))))))
10+
11+ (for ([i (in-range 5 )])
12+ (define whole-time (get-total-time "racket raco.rkt test-inputs/main.rkt " ))
13+ (define instantiation-only-time (get-total-time "racket raco.rkt --instantiation-only test-inputs/main.rkt " ))
14+ (check-true (> whole-time instantiation-only-time)))
Original file line number Diff line number Diff line change 1+ #lang racket
2+ (require "u-module.rkt " )
3+
4+ (define result (u-decrement 2 ))
Original file line number Diff line number Diff line change 1+ #lang racket
2+
3+ (provide u-decrement)
4+
5+ (define (u-decrement x) (- x 1 ))
You can’t perform that action at this time.
0 commit comments