Пример #1
0
m.connect('/schedule/add', controller='schedule:Schedule', action='Add')

m.connect('/schedule/delete', controller='schedule:Schedule', action='Delete')

m.connect('/map', controller='googlemap:MapView', action='MapView')

m.connect('/timeseries',
          controller='timeseries:Timeseries',
          action='Timeseries')

m.connect('/timeseries/data',
          controller='timeseries:Timeseries',
          action='TimeseriesData')

application = wsgi.WSGIApplication(m, debug=True)


def real_main():
    run_wsgi_app(application)


def profile_main():
    # This is the main function for profiling
    import cProfile, pstats, StringIO, logging
    prof = cProfile.Profile()
    prof = prof.runctx('real_main()', globals(), locals())
    print '<pre>'
    stats = pstats.Stats(prof)
    stats.sort_stats('cumulative')
    stats.print_stats(80)  # 80 = how many to print
Пример #2
0
          action='uploadRRCSizes')

m.connect('/anonymous/rrc/uploadRRCInferenceSizes',
          controller='RRCstates:RRCStates',
          action='uploadRRCInferenceSizes')

# raw data for performing RRC inference
m.connect('/anonymous/rrc/uploadRRCInference',
          controller='RRCstates:RRCStates',
          action='uploadRRCInference')

# For backend instance, give it something that won't
# return a 500 error.
m.connect('/_ah/start', controller='about:About', action='About')

application = wsgi.WSGIApplication(m, debug=False)


def real_main():
    run_wsgi_app(application)


def profile_main():
    # This is the main function for profiling
    import cProfile, pstats, StringIO, logging
    prof = cProfile.Profile()
    prof = prof.runctx('real_main()', globals(), locals())
    print '<pre>'
    stats = pstats.Stats(prof)
    stats.sort_stats('cumulative')
    stats.print_stats(80)  # 80 = how many to print