* bug#26172: [PATCH] bug: statprof flat display writes summary lines to current-output-port instead of the provided port
@ 2017-03-19 15:26 Freja Nordsiek
2017-04-19 14:25 ` Andy Wingo
0 siblings, 1 reply; 2+ messages in thread
From: Freja Nordsiek @ 2017-03-19 15:26 UTC (permalink / raw)
To: 26172
[-- Attachment #1: Type: text/plain, Size: 336 bytes --]
Small bug I found when using the statprof module when using the
statprof procedure with a flat display. The summary lines at the end
are not written to the port provided as an argument and are instead
written to (current-output-port). A patch is attached, which just
makes the format statements use port instead of #t.
Freja Nordsiek
[-- Attachment #2: 0001-Fixed-bug-statprof-flat-display-wasn-t-writing-summa.patch --]
[-- Type: text/x-patch, Size: 1212 bytes --]
From 17c74a4ce55685252fe7fea0cdbbc7d0a3347095 Mon Sep 17 00:00:00 2001
From: Freja Nordsiek <fnordsie@gmail.com>
Date: Sun, 19 Mar 2017 16:15:24 +0100
Subject: [PATCH] Fixed bug: statprof flat display wasn't writing summary lines
to port
* module/statprof.scm (statprof-display/flat): fixed bug where summary lines
were written to (current-output-port) instead of the provided port.
---
module/statprof.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/module/statprof.scm b/module/statprof.scm
index fe605e0..59a2f12 100644
--- a/module/statprof.scm
+++ b/module/statprof.scm
@@ -652,8 +652,8 @@ optional @var{port} argument is passed, uses the current output port."
(for-each display-stats-line sorted-stats)
(display "---\n" port)
- (format #t "Sample count: ~A\n" (statprof-sample-count state))
- (format #t "Total time: ~A seconds (~A seconds in GC)\n"
+ (format port "Sample count: ~A\n" (statprof-sample-count state))
+ (format port "Total time: ~A seconds (~A seconds in GC)\n"
(statprof-accumulated-time state)
(/ (gc-time-taken state)
1.0 internal-time-units-per-second))))))
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-19 14:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-19 15:26 bug#26172: [PATCH] bug: statprof flat display writes summary lines to current-output-port instead of the provided port Freja Nordsiek
2017-04-19 14:25 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).