Skip to content

Instantly share code, notes, and snippets.

@SavvyGuard
Created January 9, 2015 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SavvyGuard/c70a34937716bd8b190a to your computer and use it in GitHub Desktop.
Save SavvyGuard/c70a34937716bd8b190a to your computer and use it in GitHub Desktop.
Makes a bench of requests to liverail test endpoint on bidder for profiling
import requests
import json
data = {
"bcat": [
"IAB25",
"IAB7-39",
"IAB8-18",
"IAB8-5",
"IAB9-9"
],
"id": "LR_5356b2630fc162.16583113",
"imp": [
{
"id": "1",
"video": {
"mimes": [
"video/mp4",
"video/x-flv",
"video/webm"
],
"protocols": [
2,
5
],
"w": 320,
"h": 480,
"startdelay": 0,
"linearity": 1,
"minduration": 0,
"maxduration": 30,
"minbitrate": 300,
"playbackmethod": [
3
],
"ext": {
"adtype": 0
}
},
"displaymanager": "LiveRail",
"instl": 0
}
],
"app": {
"id": "13110",
"name": "Premium Game Developer Pad Interstitial",
"ver": "",
"domain": "",
"bundle": "",
"publisher": {
"id": "13110",
"cat": [],
"domain": ""
},
"content": {
"id": "",
"title": "Test",
"url": "",
"keywords": [
"addictive"
],
"context": "6",
"livestream": 0,
"len": 30
}
},
"device": {
"ua": "Chrome Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/11B554a",
"ip": "74.77.137.243",
"dpidsha1": "2b6f0cc904d137be2e1730235f5664094b831186",
"carrier": "att",
"make": "Apple",
"model": "iPad",
"os": "iOS",
"osv": "7_0_4",
"connectiontype": 2,
"ext": {
"idfa": "236A005B-700F-4889-B9CE-999EAB2B605D"
}
},
"user": {
"id": "150451451",
"buyeruid": ""
}
}
i = 0
json_data = json.dumps(data)
while i < 100:
i+=1
requests.post('http://0.0.0.0:8000/liverail/request?prof', data = json_data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment