Sha256: 013acf908748edd0c522bc6a7064923a675d7d1e2b0dfda9d3eb7cad7e44c67c

Contents?: true

Size: 622 Bytes

Versions: 12

Compression:

Stored size: 622 Bytes

Contents

<html>
<head>
<script src="../../lib/OpenLayers.js"></script>
<script>

function stringformat() {
  var string = OpenLayers.String.format("${abc} 123 ${def}", {'abc': 456, 'def': 789}) 
}    
function run(x) {
    var date = new Date();
    for (var i = 0; i < x; i++) {
        stringformat();
    }
    var elapsed = (new Date() - date);
    return elapsed;
}

function show_time(x) 
{
    var t = run(x);
    document.getElementById("out").innerHTML = t + "ms  for " + x + " runs";
}
</script>
</head>
<body>
<a onclick="javascript:show_time(100000); return false" href="#">Run</a>
<div id="out"></div>
</body>
</html>

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
postrunner-0.0.10 misc/openlayers/tests/speed/string_format.html
postrunner-0.0.9 misc/openlayers/tests/speed/string_format.html
postrunner-0.0.8 misc/openlayers/tests/speed/string_format.html
postrunner-0.0.7 misc/openlayers/tests/speed/string_format.html
postrunner-0.0.6 misc/openlayers/tests/speed/string_format.html
postrunner-0.0.5 misc/openlayers/tests/speed/string_format.html
postrunner-0.0.4 misc/openlayers/tests/speed/string_format.html
gb_mapfish_appserver-0.0.5 vendor/assets/javascripts/openlayers/tests/speed/string_format.html
gb_mapfish_appserver-0.0.4 vendor/assets/javascripts/openlayers/tests/speed/string_format.html
gb_mapfish_appserver-0.0.3 vendor/assets/javascripts/openlayers/tests/speed/string_format.html
gb_mapfish_appserver-0.0.2 vendor/assets/javascripts/openlayers/tests/speed/string_format.html
gb_mapfish_appserver-0.0.1 vendor/assets/javascripts/openlayers/tests/speed/string_format.html