benchmarks/Strcat.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 19 Jan 2013 23:19:12 +0000
branchrefactoring-vmdata
changeset 1985 7c5a14d663ba
parent 1818 2e5ed72e7dfd
child 2014 9fa66342102b
permissions -rw-r--r--
Temporary commit. JavaNativeMethod refactored to use new-style native methods. Java VM does not boot at this point.

"{ 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::                                                                                                                        $'
! !