Forum guidelines
AuthorQuestion
EXECUTION TIME FOR 30-40 MULTIPLE simultaneous USERS
Posted on: 07 Jan 2014
 I have a small windows application where the click on a button will display the  list of users in a datagrid  starting with a name that is entered in a textbox..

I would like to find out how much it takes if there are 30 users uses this search page simultaneously and find out the time it takes to fetch the results on to datagrid of my windows application.. 


sample code: 

private void btnseacrh_Click(object sender, EventArgs e)
  {
      var name=txttextbox.Text;

     var Resultdataset= Fecthresultfromdb(name);
     
 // retchresultfromdb method calls the database and fetches all the people whose name //starts with 'name' value entered in a textbox
     
    //finally result set is bind to datagrid for display

    datagrid.datasource=Resultdataset;

  }  
Now I would like to know if there are 30 users concurrently using this seacrher window,how much time it takes..This is one of non functional requirement that has to be met within 3 secs.

PLease tell what modifications i need to do..PLease share the modified code snippet as well.








AuthorReply
Re: EXECUTION TIME FOR 30-40 MULTIPLE simultaneous USERS
Posted on: 09 Jan 2014  
Dhirendra Misra
  • 0
  • 0
accepted
Re: EXECUTION TIME FOR 30-40 MULTIPLE simultaneous USERS
Posted on: 10 Jan 2014   Accepted Answer
Hello Mahesh,

You can make use of Stopwatch to get the time difference between the functionality. 

Like the below example:
var s2 = Stopwatch.StartNew();
for (int i = 0; i < max; i++)
{  
var pair = new KeyValuePair<string, string>("cat", "dog");
}
s2.Stop();
Console.WriteLine(((double)(s1.Elapsed.TotalMilliseconds * 1000000) / max).ToString("0.00 ns"));

For concurrency you can use TPL (Task Parallel Library)
Details:
http://msdn.microsoft.com/en-us/library/dd537609(v=vs.110).aspx

Dhirendra Misra Please don't forget to mark as answer if this post helps you.
Re: EXECUTION TIME FOR 30-40 MULTIPLE simultaneous USERS
Posted on: 12 Jan 2014  
Thats fine..but in case i need to do a load test using VSTS TEST TOOL then how would I do this...??because all load test articles and tutorials are based on web test which is provided as an input to load test..But here for windows application u cant do web test....and in case if u plan to provide unit test as an input to load test,then what unit test case u will write for a functionality that will do just a search from db and displays on the data grid..

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.