home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.6)
-
- from tests.testapp import testapp
- from time import clock
- import os.path as os
-
- def benchmark(fbdata):
- Storage = Storage
- import util
- account = Storage(protocol = 'fb20', connection = Storage(last_stream = fbdata['stream'], last_alerts = fbdata['alerts'], last_status = fbdata['status']))
- FBIB = FBIB
- import fb20.fbacct
-
- def doit():
- before = clock()
- FBIB(account, cache = False).get_html(None)
- return clock() - before
-
- print 'first ', doit()
- print 'second', doit()
-
-
- def main():
- app = testapp()
- import cPickle
- fbdata_file = os.path.join(os.path.dirname(__file__), 'fbdata.dat')
- fbdata = cPickle.loads(open(fbdata_file, 'rb').read())
- benchmark(fbdata)
-
- if __name__ == '__main__':
- main()
-
-