Пример #1
0
def processGetRequestById(number, pathProcessing):
    getUser = lambda: processGet(pathProcessing, {'Host': 'localhost'},
                                 '/resources/Devel/Request/1')
    runTime = timeit.timeit(getUser, number=number)
    print(
        'Made %s get Request requests in %s seconds, meaning %s requests/second'
        % (number, runTime, number / runTime))
Пример #2
0
def processGetLanguageByCode(number, pathProcessing):
    getUser = lambda: processGet(pathProcessing, {'Host': 'localhost'},
                                 '/resources/Superdesk/Language/en')
    runTime = timeit.timeit(getUser, number=number)
    print(
        'Made %s get Language requests in %s seconds, meaning %s requests/second'
        % (number, runTime, number / runTime))
Пример #3
0
def processRegisteredGetUserById(number):
    getUser = lambda: processGet(PATH_PROCESSING, {'Host': 'localhost'},
                                 '/resources/Superdesk/User/1')
    runTime = timeit.timeit(getUser, number=number)
    print(
        'Made %s get User requests in %s seconds, meaning %s requests/second' %
        (number, runTime, number / runTime))
Пример #4
0
def processRegisteredGetLanguageByCode(number):
    global PATH_PROCESSING
    getUser = lambda: processGet(PATH_PROCESSING, {"Host": "localhost"}, "/resources/Superdesk/Language/en")
    runTime = timeit.timeit(getUser, number=number)
    print(
        "Made %s get Language requests in %s seconds, meaning %s requests/second" % (number, runTime, number / runTime)
    )
Пример #5
0
def processRegisteredGetLanguageByCode(number):
    global PATH_PROCESSING
    getUser = lambda: processGet(PATH_PROCESSING, {'Host': 'localhost'},
                                 '/resources/Superdesk/Language/en')
    runTime = timeit.timeit(getUser, number=number)
    print(
        'Made %s get Language requests in %s seconds, meaning %s requests/second'
        % (number, runTime, number / runTime))
Пример #6
0
def processRegisteredGetUserById(number):
    getUser = lambda: processGet(PATH_PROCESSING, {"Host": "localhost"}, "/resources/Superdesk/User/1")
    runTime = timeit.timeit(getUser, number=number)
    print("Made %s get User requests in %s seconds, meaning %s requests/second" % (number, runTime, number / runTime))
Пример #7
0
def processGetLanguageByCode(number, pathProcessing):
    getUser = lambda: processGet(pathProcessing, {"Host": "localhost"}, "/resources/Superdesk/Language/en")
    runTime = timeit.timeit(getUser, number=number)
    print(
        "Made %s get Language requests in %s seconds, meaning %s requests/second" % (number, runTime, number / runTime)
    )
Пример #8
0
def processGetRequestById(number, pathProcessing):
    getUser = lambda: processGet(pathProcessing, {"Host": "localhost"}, "/resources/Devel/Request/1")
    runTime = timeit.timeit(getUser, number=number)
    print(
        "Made %s get Request requests in %s seconds, meaning %s requests/second" % (number, runTime, number / runTime)
    )