Created
February 29, 2016 08:57
-
-
Save lepinkainen/417caa221ef428a67541 to your computer and use it in GitHub Desktop.
Flexget series API performance test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from datetime import datetime | |
from dateutil import parser | |
from dateutil.relativedelta import relativedelta | |
host = 'localhost' | |
port = 9090 | |
token = 'LOL' | |
get_movies_endpoint = '/api/series/?in_config=all&page=1&number_of_shows=100&sort_by=show_name&order=desc' | |
delete_movies_endpoint = '/api/movie_queue/{0}' | |
date_threshold_in_years = 4 | |
url = 'http://{0}:{1}{2}'.format(host, port, get_movies_endpoint) | |
headers = {'Authorization': 'Token {0}'.format(token)} | |
response = requests.get(url=url, headers=headers).json() | |
# real 2m37.643s | |
# without print command | |
#print response | |
# real 2m59.810s | |
# with print command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment