File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 128128 (define name (symbol->string (execution-name execution)))
129129 (define precision
130130 (- (execution-precision execution) (remainder (execution-precision execution) prec-threshold)))
131- (timeline-push!/unsafe 'mixsample (execution-time execution) name precision))
131+ (timeline-push!/unsafe 'mixsample
132+ (execution-time execution)
133+ name
134+ precision
135+ (execution-memory execution)))
132136 (timeline-push!/unsafe 'outcomes
133137 (- (current-inexact-milliseconds) start)
134138 (rival-profile machine 'iterations )
Original file line number Diff line number Diff line change 162162
163163(define (render-phase-mixed-sampling mixsample)
164164 (define total-time (apply + (map first mixsample)))
165+ (define (format-memory-bytes bytes)
166+ (format "~a MiB " (~r (/ bytes (expt 2 20 )) #:precision '(= 1 ))))
165167 `((dt "Precisions " )
166168 (dd (details
167169 (summary "Click to see histograms. Total time spent on operations: "
173175 (define op (second (car rec)))
174176 (define precisions (map third rec))
175177 (define times (map first rec))
178+ (define memories (map fourth rec))
179+
176180 (define time-per-op (round (apply + times)))
181+ (define memory-per-op (apply + memories))
177182
178183 (list `(details (summary (code ,op)
179184 ": "
180185 ,(format-time time-per-op)
181186 " ( "
182187 ,(format-percent time-per-op total-time)
183- " of total) " )
188+ " of total, "
189+ ,(format-memory-bytes memory-per-op)
190+ ") " )
184191 (canvas ([id ,(format "calls-~a " n)]
185192 [title
186193 "Histogram of precisions of the used operation " ]))
Original file line number Diff line number Diff line change 186186
187187(define-timeline memory [live +] [alloc +])
188188(define-timeline method [method])
189- (define-timeline mixsample [time +] [function false ] [precision false ])
189+ (define-timeline mixsample [time +] [function false ] [precision false ] [memory +] )
190190(define-timeline times [time +] [input false ])
191191(define-timeline series [time +] [var false ] [transform false ])
192192(define-timeline compiler [before +] [after +])
You can’t perform that action at this time.
0 commit comments