tools.profiler.sampling: use formatting instead of math.parser.private.

db4
John Benediktsson 2014-08-05 11:41:22 -07:00
parent 3cfac7916a
commit 6f3d6ad560
1 changed files with 7 additions and 8 deletions

View File

@ -1,10 +1,9 @@
! (c)2011 Joe Groff bsd license ! (c)2011 Joe Groff bsd license
USING: accessors assocs combinators USING: accessors assocs combinators combinators.short-circuit
combinators.short-circuit continuations fry generalizations continuations formatting fry generalizations hashtables.identity
hashtables.identity io kernel kernel.private layouts locals io kernel kernel.private layouts locals math math.parser
math math.parser math.parser.private math.statistics math.statistics math.vectors memory namespaces prettyprint
math.vectors memory namespaces prettyprint sequences sequences sequences.generalizations sets sorting ;
sequences.generalizations sets sorting ;
FROM: sequences => change-nth ; FROM: sequences => change-nth ;
FROM: assocs => change-at ; FROM: assocs => change-at ;
IN: tools.profiler.sampling IN: tools.profiler.sampling
@ -201,10 +200,10 @@ PRIVATE>
>alist [ second total-time>> ] inv-sort-with ; >alist [ second total-time>> ] inv-sort-with ;
: duration. ( duration -- ) : duration. ( duration -- )
1000 * >float "%9.1f" format-float write ; 1000 * "%9.1f" printf ;
: percentage. ( num denom -- ) : percentage. ( num denom -- )
[ 100 * ] dip /f "%6.2f" format-float write ; [ 100 * ] dip /f "%6.2f" printf ;
DEFER: (profile.) DEFER: (profile.)