Mercurial > hg > xemacs-beta
comparison lisp/utils/bench.el @ 82:6a378aca36af r20-0b91
Import from CVS: tag r20-0b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:07:36 +0200 |
parents | 1ce6082ce73f |
children |
comparison
equal
deleted
inserted
replaced
81:ebca3d831cea | 82:6a378aca36af |
---|---|
1 ;;; bench.el --- benchmarking utility for emacsen | 1 ;;; bench.el --- benchmarking utility for emacsen |
2 | 2 |
3 ;; Copyright (C) 1987,88,89,90,93,94,95,96 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1987,88,89,90,93,94,95,96 Free Software Foundation, Inc. |
4 ;; $Id: bench.el,v 1.2 1997/01/11 20:14:12 steve Exp $ | 4 ;; $Id: bench.el,v 1.3 1997/01/23 05:29:43 steve Exp $ |
5 ;; $Source: /afs/informatik.uni-tuebingen.de/local/web/xemacs/xemacs-cvs/XEmacs/xemacs/lisp/utils/Attic/bench.el,v $ | 5 ;; $Source: /afs/informatik.uni-tuebingen.de/local/web/xemacs/xemacs-cvs/XEmacs/xemacs/lisp/utils/Attic/bench.el,v $ |
6 ;; $Revision: 1.2 $ | 6 ;; $Revision: 1.3 $ |
7 ;; $Author: steve $ | 7 ;; $Author: steve $ |
8 ;; $Date: 1997/01/11 20:14:12 $ | 8 ;; $Date: 1997/01/23 05:29:43 $ |
9 | 9 |
10 ;; Author: Shane Holder <holder@rsn.hp.com> | 10 ;; Author: Shane Holder <holder@rsn.hp.com> |
11 ;; Adapted-By: Steve Baur <steve@altair.xemacs.org> | 11 ;; Adapted-By: Steve Baur <steve@altair.xemacs.org> |
12 ;; Further adapted by: Shane Holder <holder@rsn.hp.com> | 12 ;; Further adapted by: Shane Holder <holder@rsn.hp.com> |
13 ;; Keywords: internal, maint | 13 ;; Keywords: internal, maint |
323 ) | 323 ) |
324 | 324 |
325 ;----------------------------------------------------------------------------- | 325 ;----------------------------------------------------------------------------- |
326 (defconst bench-mark-insert-into-empty-buffer-num-words 100000) | 326 (defconst bench-mark-insert-into-empty-buffer-num-words 100000) |
327 | 327 |
328 (defun bench-handler-insert-into-empty-buffer () | 328 (defun bench-handler-insert-into-empty-buffer (times) |
329 (set-buffer (get-buffer-create "*tmp*")) | 329 (set-buffer (get-buffer-create "*tmp*")) |
330 (bench-mark-insert-into-empty-buffer) | 330 (bench-mark-insert-into-empty-buffer) |
331 (erase-buffer) | 331 (erase-buffer) |
332 (kill-buffer "*tmp*") | 332 (kill-buffer "*tmp*") |
333 ) | 333 ) |
338 (insert "0123456789\n") | 338 (insert "0123456789\n") |
339 (setq a (1- a)))) | 339 (setq a (1- a)))) |
340 ) | 340 ) |
341 | 341 |
342 ;============================================================================= | 342 ;============================================================================= |
343 (defconst bench-version (let ((rcsvers "$Revision: 1.2 $")) | 343 (defconst bench-version (let ((rcsvers "$Revision: 1.3 $")) |
344 (substring rcsvers 11 (- (length rcsvers) 2))) | 344 (substring rcsvers 11 (- (length rcsvers) 2))) |
345 "*Version number of bench.el") | 345 "*Version number of bench.el") |
346 | 346 |
347 (defconst temp-dir (file-name-as-directory | 347 (defconst temp-dir (file-name-as-directory |
348 (or (getenv "TMPDIR") | 348 (or (getenv "TMPDIR") |