Changes between Version 77 and Version 78 of DeveloperGuidelines/Optimisation


Ignore:
Timestamp:
01/26/12 23:43:28 (13 years ago)
Author:
Fran Boon
Comment:

Simple test script

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Optimisation

    v77 v78  
    275275 * http://developer.yahoo.com/blogs/ydn/posts/2009/10/a_engineers_gui/
    276276
     277Simple script to place in a controller:
     278{{{
     279def test():
     280    from datetime import datetime
     281    start = datetime.today()
     282    for i in xrange(0, 1000):
     283        <testcode: variant A>
     284    middle = datetime.datetime.today()
     285    for i in xrange(0, 1000):
     286        <testcode: variant B>
     287    end = datetime.today()
     288    a = middle - start
     289    b = end - middle
     290    output = TABLE(TR("A: %s" % a),
     291                   TR("B: %s" % b))
     292    return output.xml()
     293}}}
    277294== Scalability ==
    278295