benchmarks/Strcat.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 19 Apr 2013 13:50:19 +0200
branchdevelopment
changeset 2532 64a784c73d1e
parent 2429 ebece4dcaab9
child 2573 59aeefc96cf4
permissions -rw-r--r--
Update bytecode and constpool upon context restart. This way the restarted method can execute new code. This allows for fix & continue workflow. Should check for exceptions - will do it later.

"{ 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_CVS
    ^ '$Header: /cvs/stx/stx/libjava/benchmarks/Strcat.st,v 1.2 2013-02-25 11:15:32 vrany Exp $'
!

version_HG

    ^ '$Changeset: <not expanded> $'
!

version_SVN
    ^ '§Id::                                                                                                                        §'
! !