From 46a93d89ca48b384f73dce1fd476f224edeaa82f Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Wed, 3 May 1995 21:37:11 +0000 Subject: [PATCH] Changed SHOW-TIME to break process time into non-gc and gc times. --- v7/src/runtime/global.scm | 19 ++++++++++++++----- v8/src/runtime/global.scm | 19 ++++++++++++++----- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/v7/src/runtime/global.scm b/v7/src/runtime/global.scm index 7e1952e0f..5c01b769b 100644 --- a/v7/src/runtime/global.scm +++ b/v7/src/runtime/global.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: global.scm,v 14.47 1995/03/20 20:14:10 adams Exp $ +$Id: global.scm,v 14.48 1995/05/03 21:37:11 adams Exp $ Copyright (c) 1988-93 Massachusetts Institute of Technology @@ -182,14 +182,23 @@ MIT in each case. |# (define (show-time thunk) (let ((process-start (process-time-clock)) + (process-start/nogc (runtime)) (real-start (real-time-clock))) (let ((value (thunk))) - (let ((process-end (process-time-clock)) - (real-end (real-time-clock))) + (let* ((process-end (process-time-clock)) + (process-end/nogc (runtime)) + (real-end (real-time-clock)) + (process-time (- process-end process-start)) + (process-time/nogc + (round->exact (* 1000 (- process-end/nogc process-start/nogc))))) (newline) (write-string "process time: ") - (write (- process-end process-start)) - (write-string "; real time: ") + (write process-time) + (write-string " (") + (write process-time/nogc) + (write-string " RUN + ") + (write (- process-time process-time/nogc)) + (write-string " GC); real time: ") (write (- real-end real-start))) value))) diff --git a/v8/src/runtime/global.scm b/v8/src/runtime/global.scm index 7e1952e0f..5c01b769b 100644 --- a/v8/src/runtime/global.scm +++ b/v8/src/runtime/global.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: global.scm,v 14.47 1995/03/20 20:14:10 adams Exp $ +$Id: global.scm,v 14.48 1995/05/03 21:37:11 adams Exp $ Copyright (c) 1988-93 Massachusetts Institute of Technology @@ -182,14 +182,23 @@ MIT in each case. |# (define (show-time thunk) (let ((process-start (process-time-clock)) + (process-start/nogc (runtime)) (real-start (real-time-clock))) (let ((value (thunk))) - (let ((process-end (process-time-clock)) - (real-end (real-time-clock))) + (let* ((process-end (process-time-clock)) + (process-end/nogc (runtime)) + (real-end (real-time-clock)) + (process-time (- process-end process-start)) + (process-time/nogc + (round->exact (* 1000 (- process-end/nogc process-start/nogc))))) (newline) (write-string "process time: ") - (write (- process-end process-start)) - (write-string "; real time: ") + (write process-time) + (write-string " (") + (write process-time/nogc) + (write-string " RUN + ") + (write (- process-time process-time/nogc)) + (write-string " GC); real time: ") (write (- real-end real-start))) value))) -- 2.25.1