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
@Path("/user") | |
public class UserResource { | |
@PUT | |
@Path("{username: [a-zA-Z][a-zA-Z_0-9]*}") | |
@Consumes("application/json, application/xml") | |
@Produces("application/json, application/xml") | |
public Response updateUser(@PathParam("username") String userName) { | |
//Do your thing here… ;) | |
} |
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
@Path("/heiverden") | |
public class HeiVerdenResource { | |
@GET | |
@Produces("text/plain") | |
public String heiVerdenMetoden() { | |
return "Hei verden!"; | |
} | |
} |
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
from net.grinder.script.Grinder import grinder | |
from net.grinder.script import Test | |
from net.grinder.plugin.http import HTTPRequest | |
from net.grinder.common import GrinderException | |
from HTTPClient import Codecs, NVPair | |
from net.grinder.plugin.http import HTTPPluginControl | |
from net.grinder.plugin.http import HTTPUtilities | |
from org.json import * | |
from java.util import Random | |
from java.lang import String |
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
Tests Errors Mean Test Test Time TPS Mean Response Response Mean time to Mean time to Mean time to | |
Time (ms) Standard response bytes per errors resolve host establish first byte | |
Deviation length second connection | |
(ms) | |
Test 201 1 0 793.00 0.00 0.25 9038.00 2274.86 0 65.00 303.00 571.00 "REST twittersoek" | |
Test 202 15 0 209.07 443.90 3.78 5714.73 21575.89 0 180.53 214.13 163.93 "REST profilbilder" | |
Totals 16 0 24 |
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
from net.grinder.script.Grinder import grinder | |
from net.grinder.script import Test | |
from net.grinder.plugin.http import HTTPRequest | |
from net.grinder.common import GrinderException | |
from net.grinder.plugin.http import HTTPPluginControl | |
from org.json import * | |
baseUrl = grinder.properties.getProperty("baseUrl", "http://localhost:8080") | |
sokeord = grinder.properties.getProperty("sokeord", "twitter") |
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
Tests Errors Mean Test Test Time TPS Mean Response Response Mean time to Mean time to Mean time to | |
Time (ms) Standard response bytes per errors resolve host establish first byte | |
Deviation length second connection | |
(ms) | |
Test 101 20 0 496.55 47.96 7.88 304371.00 2399456.05 0 1.85 22.15 123.60 "Laste vg.no" | |
Totals 20 0 496.55 47.96 7.88 304371.00 2399456.05 0 1.85 22.15 123.60 |
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
git clone git@github.com:Espenhh/Grinder-eksempel.git #klone repository | |
cd Grinder-eksempel #håper du vet hva denne gjør... | |
./bin/startAgent.sh vg #ytelsestest mot VG.no. 1 prosess, 4 tråder, 5 runs/tråd | |
#sjekk mappen log, og filen out... for ytelsestestdata fra 20 kall mot VG.no | |
./bin/startAgent.sh jsoneksempel #kjører ytelsestest mot twitter's søkeAPI. | |
#Søker etter "grinder", parser JSON og henter ned profilbildet til alle disse | |
#sjekk mappen log og filen out.. nye data her nå |
NewerOlder