[GHC] #8861: Use commas to separate thousands when printing memory stats

#8861: Use commas to separate thousands when printing memory stats -------------------------------------------+------------------------------- Reporter: ErlendH | Owner: Type: feature request | Status: new Priority: lowest | Milestone: Component: GHCi | Version: 7.6.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Easy (less than 1 hour) | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: -------------------------------------------+------------------------------- In GHCi, by enabling printing of timing/memory stats after each evaluation (`:set +s`), the memory stats is printed in bytes. When this number is quite large, it's hard to see – at a glance – how much memory was used. It would be nicer if this was printed as “1,200,000 bytes” instead of “1200000 bytes” as is the case now. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8861 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8861: Use commas to separate thousands when printing memory stats -------------------------------+------------------------------------------- Reporter: ErlendH | Owner: Type: feature | Status: patch request | Milestone: Priority: lowest | Version: 7.6.3 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Changes (by ErlendH): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8861#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8861: Use commas to separate thousands when printing memory stats -------------------------------+------------------------------------------- Reporter: ErlendH | Owner: Type: feature | Status: patch request | Milestone: Priority: lowest | Version: 7.6.3 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Comment (by tibbe): I believe there are tools (e.g. nofib-analyse) that rely on the current format. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8861#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8861: Use commas to separate thousands when printing memory stats -------------------------------+------------------------------------------- Reporter: ErlendH | Owner: Type: feature | Status: patch request | Milestone: Priority: lowest | Version: 7.6.3 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Comment (by rwbarton): `./prog +RTS -s` already prints the memory stats with commas, can you reuse whatever code does the formatting there? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8861#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8861: Use commas to separate thousands when printing memory stats
-------------------------------+-------------------------------------------
Reporter: ErlendH | Owner:
Type: feature | Status: patch
request | Milestone:
Priority: lowest | Version: 7.6.3
Component: GHCi | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Easy (less than 1 hour)
Unknown/Multiple | Blocked By:
Type of failure: | Related Tickets:
None/Unknown |
Test Case: |
Blocking: |
-------------------------------+-------------------------------------------
Comment (by ErlendH):
tibbe: Good point. I did a quick check, running nofib and looking at the
output. The file's `<

#8861: Use commas to separate thousands when printing memory stats -------------------------------+------------------------------------------- Reporter: ErlendH | Owner: Type: feature | Status: patch request | Milestone: Priority: lowest | Version: 7.6.3 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Comment (by ErlendH): The formatting code that prints bytes used when passing the `-s` switch to the RTS is in the RTS C code (`showStgWord64()` in `rts/RtsUtils.c`), so that code would probably be difficult to reuse. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8861#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8861: Use commas to separate thousands when printing memory stats -------------------------------+------------------------------------------- Reporter: ErlendH | Owner: Type: feature | Status: closed request | Milestone: Priority: lowest | Version: 7.6.3 Component: GHCi | Keywords: Resolution: fixed | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Changes (by thoughtpolice): * status: patch => closed * resolution: => fixed Comment: Merged, thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8861#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8861: Use commas to separate thousands when printing memory stats -------------------------------+------------------------------------------- Reporter: ErlendH | Owner: Type: feature | Status: closed request | Milestone: 7.10.1 Priority: lowest | Version: 7.6.3 Component: GHCi | Keywords: Resolution: fixed | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 hour) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | -------------------------------+------------------------------------------- Changes (by hvr): * milestone: => 7.10.1 Comment: btw, this went in as 9ca17f8850aeaf1fd2109532338da2ffc0e8be1b -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8861#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC