benchmarks/Strcat.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 16 Sep 2013 14:09:52 +0100
branchdevelopment
changeset 2734 f56049613ff3
parent 2731 13f5be2bf83b
child 3107 d1d41053a1c8
permissions -rw-r--r--
Initial support for live code checker / lint. JavaLintService parses the code as you type and displays all errors and other problems. This is done by running compiler in check mode in background. This also removes the necessity for JavaCompilerProblemRegistry.

"{ 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.3 2013-09-06 00:41:34 vrany Exp $'
!

version_HG

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

version_SVN
    ^ 'Id::                                                                                                                        '
! !