Mercurial > hg > xemacs-beta
comparison lisp/prim/profile.el @ 155:43dd3413c7c7 r20-3b4
Import from CVS: tag r20-3b4
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:39:39 +0200 |
parents | 131b0175ea99 |
children | 5a88923fcbfe |
comparison
equal
deleted
inserted
replaced
154:94141801dd7e | 155:43dd3413c7c7 |
---|---|
1 ;;; profile.el --- basic profiling commands for XEmacs | 1 ;;; profile.el --- basic profiling commands for XEmacs |
2 | 2 |
3 ;; Copyright (C) 1996 Ben Wing. | 3 ;; Copyright (C) 1996 Ben Wing. |
4 | |
5 ;; Maintainer: XEmacs Development Team | |
6 ;; Keywords: internal | |
4 | 7 |
5 ;; This file is part of XEmacs. | 8 ;; This file is part of XEmacs. |
6 | 9 |
7 ;; XEmacs is free software; you can redistribute it and/or modify it | 10 ;; XEmacs is free software; you can redistribute it and/or modify it |
8 ;; under the terms of the GNU General Public License as published by | 11 ;; under the terms of the GNU General Public License as published by |
19 ;; Free Software Foundation, 59 Temple Place - Suite 330, | 22 ;; Free Software Foundation, 59 Temple Place - Suite 330, |
20 ;; Boston, MA 02111-1307, USA. | 23 ;; Boston, MA 02111-1307, USA. |
21 | 24 |
22 ;;; Synched up with: Not in FSF. | 25 ;;; Synched up with: Not in FSF. |
23 | 26 |
27 ;;; Commentary: | |
28 | |
29 ;;; Code: | |
30 | |
31 ;;;###autoload | |
24 (defun pretty-print-profiling-info (&optional info) | 32 (defun pretty-print-profiling-info (&optional info) |
25 "Print profiling info INFO to standard output in a pretty format. | 33 "Print profiling info INFO to standard output in a pretty format. |
26 If INFO is omitted, the current profiling info is retrieved using | 34 If INFO is omitted, the current profiling info is retrieved using |
27 `get-profiling-info'." | 35 `get-profiling-info'." |
28 (if info (setq info (copy-alist info)) | 36 (if info (setq info (copy-alist info)) |
38 (while info | 46 (while info |
39 (let ((f (caar info))) | 47 (let ((f (caar info))) |
40 (princ (format "%-50s%10d %6.3f\n" f (cdar info) | 48 (princ (format "%-50s%10d %6.3f\n" f (cdar info) |
41 (* 100 (/ (cdar info) sum))))) | 49 (* 100 (/ (cdar info) sum))))) |
42 (setq info (cdr info))))) | 50 (setq info (cdr info))))) |
51 | |
52 ;;; profile.el ends here |