vendredi 27 mai 2016

Load test WebClient server

I am a developer who has no load test experience and would like to learn how to do this.

I have a simple client server application where the client sends a request to the server and the server sends a response back.

I would like to load test this but I am not sure how to do this. Here is my GetResponse method which receives a response from the server.

    Response GetResponse(Request request)
    {
        string data = Newtonsoft.Json.JsonConvert.SerializeObject(request);

        System.Net.WebClient wb = new System.Net.WebClient();
        string response = wb.UploadString("http://localhost:8080", data);

        return Newtonsoft.Json.JsonConvert.DeserializeObject<Response>(response);
    }

My initial thoughts are to write a routine to send a load of get response requests all at the same time and then try and monitor the CPU ticks or other to see how it is performing.

Can anyone let me know if this is the correct way to go about it? I am also not really sure what the best stats to gather are?

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire