Megatest

Diff
Login

Differences From Artifact [9609771573]:

To Artifact [58e8e17739]:


153
154
155
156
157
158
159




























160
161
162
163
164
165
166
           (color-off "\x1b[0m")
           (dp-args
            (append
             (list 0 *default-log-port*
                   (conc color-on location "@"(/ (- (current-milliseconds) *BB-process-starttime*) 1000) color-off "   ")  )
             in-args)))
      (apply debug:print dp-args))))





























(define *BBpp_custom_expanders_list* (make-hash-table))



;; register hash tables with BBpp.
(hash-table-set! *BBpp_custom_expanders_list* HASH_TABLE:







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
           (color-off "\x1b[0m")
           (dp-args
            (append
             (list 0 *default-log-port*
                   (conc color-on location "@"(/ (- (current-milliseconds) *BB-process-starttime*) 1000) color-off "   ")  )
             in-args)))
      (apply debug:print dp-args))))

(define *BBprofile-hash* (make-hash-table))
(define (BBprofile-thunk procname thunk)
  (let* ((old-proctally (hash-table-ref/default *BBprofile-hash* procname
                                                '(0 . 0)))
         (old-proccalls (car old-proctally))
         (old-procduration (cdr old-proctally))
         (before-ms (current-milliseconds))
         (res  (thunk))
         (after-ms (current-milliseconds))
         (duration (/ (- after-ms before-ms) 1000))
         (proccalls (add1 old-proccalls))
         (procduration (+ duration old-procduration)))
    (hash-table-set! *BBprofile-hash* procname
                     (cons proccalls procduration))
    (BB> "@@@@ called "procname" ; duration="duration" ; totcalls="proccalls
         " avg="(/ procduration proccalls)" tot="procduration)
    res))
(define (BBprofile . in-args)
  (let* ((proc (car in-args))
         (args (cdr in-args))
         (procname (symbol->string (car (procedure-information proc))))
         (thunk (lambda ()
                  (apply proc args))))
    (BBprofile-thunk procname thunk)))




(define *BBpp_custom_expanders_list* (make-hash-table))



;; register hash tables with BBpp.
(hash-table-set! *BBpp_custom_expanders_list* HASH_TABLE: