benchmarks/Strcat.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 19 Jan 2013 19:23:53 +0000
branchrefactoring-vmdata
changeset 1983 03dcc3899eea
parent 1818 2e5ed72e7dfd
child 2014 9fa66342102b
permissions -rw-r--r--
Make all native methods source ending with ': nativeContext'. This will ease automatic refactoring. Also, rename method categories with prefix 'OLD -'.

"{ Package: 'stx:libjava/benchmarks' }"

JavaBenchmark subclass:#Strcat
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Benchmarks-Java-Micro'
!


!Strcat methodsFor:'running'!

runBenchmarkS:n 
    | stream  hello |

    stream := WriteStream on:String new.
    hello := 'hello' , Character cr asString.
    10 timesRepeat:[
        stream nextPutAll:hello
    ].
    ^ Time 
        millisecondsToRun:[
            1 to: n do: [:idx|
                stream nextPutAll:hello
            ].
        ].
! !

!Strcat class methodsFor:'documentation'!

version_SVN
    ^ '$Id::                                                                                                                        $'
! !