#HTTP:
- this should take 2 hours approx.
###Intro:
- Define HTTP (wikipedia):
"The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems.
URL : | |
http://www.oref.org.il/WarningMessages/alerts.json | |
response example : | |
{ | |
"id" : "1405269005749", | |
"title" : "פיקוד העורף התרעה במרחב ", | |
"data" : [ | |
"דן 157", | |
"דן 162", | |
"דן 155", |
import akka.actor.ActorSystem | |
import spray.http.MediaTypes._ | |
import spray.routing.SimpleRoutingApp | |
object LightVersion extends App with SimpleRoutingApp { | |
implicit val system = ActorSystem("my-system") | |
startServer(interface = "0.0.0.0", port = 9119) { | |
path("api") { get { parameters('id.as[String]) | |
.as(Request) { request => { respondWithMediaType(`text/html`) { complete { |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDjoWP+tTgluKE/6s7aRCsXAzBgAxmeZ9D2dwuXT45cgnTDrQeqocafplf1YQ3zUe6bjDtctCq+ZBmp6RDtWmBhSahBYueDAR7KrX/7teM5Bs8ilVojLBCnCRGEURU0LuY6RxulVUgTzYaQYOzXTpuOH71uyyyDq3JKSBLA3WNRGHBigJGznZm3sA1s0CfTs9CAhPEvsgCGVq2xCTYj37q9DdBW93GY+XqXlY9zj0oo+Qy3DDCSBg/m5S7+P/EooTEiHNBZRbd/FvSFG7s8Nbw9oCPDKnk3Kv8nQYtmI5IPmSRgf3XHL7BJN+XyE4RltMMh/rPWxLVA5puMl6y0FnZP Nimrod_Lahav@NimMac.local |
{ | |
"builders": [ | |
{ | |
"type": "digitalocean", | |
"api_token": "XXXX", | |
"image": "ubuntu-14-04-x64", | |
"region" : "nyc3", | |
"size" : "1gb", | |
"droplet_name" : "gatlingNode" | |
}, |
<?php | |
date_default_timezone_set('Asia/Jerusalem'); | |
echo "New Relic + Little Bits<br>"; | |
$appId = YOUR-NEWRELIC-APP-ID; | |
$timePicker = 30; //get last 30 minutes error rate from newrelic | |
$relicKey = 'YOUR-RELIC-JEY'; | |
$deviceId = 'YOUR-CLOUD-BIT-DEVICE-ID'; | |
$cloudBitKey = 'YOUR-CLOUD-BIT-KEY'; |
Pause: | |
Fixed pause duration: | |
pause(duration: Duration) | |
Random pause duration: | |
pause(min: Duration, max: Duration) | |
Example: | |
.exec(http("get some page").get("/some.php")).pause(1 seconds, 10 seconds) | |
Wiki: | |
http://gatling.io/docs/2.0.0-RC2/general/scenario.html |
#HTTP:
###Intro:
"The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems.
{ | |
"loading": [ | |
"blabla", | |
"blablalba" | |
], | |
"metrics": [ | |
{ | |
"id": 123, | |
"title": "some title", | |
"emojiValue": "someValue", |
[ | |
{ | |
"id": "someId", | |
"title": "some title", | |
"from": "1/1/2012", | |
"to": "26/1/2012", | |
"added": "2/2/2012", | |
"members": [ | |
"some1", | |
"another1" |
[ | |
{ | |
"id": "someId", | |
"xData": [ | |
"1", | |
"2", | |
"3" | |
], | |
"yData": [ | |
"4", |