locked
web api testing Fail RRS feed

  • Question

  • User-2012801151 posted

    Hi,

    i developed web api project to pass data for my other anguler.js base project. should pass model serialize like this ? and it is good or bad ? after application is stressed by  ibm rational performance tester using one user . response  time 4000 ms .but i login using chrome one user .response time 400 ms . how to solve this problem ? 

    [HttpPost]
            public UserLoginResponse PostValidateUserResponse(PostUser User)
            {
                log.Info("PostValidateUserResponse Start()");
                UserLoginResponse ouserloginresponse = new UserLoginResponse();
                if (User != null)
                {
                    try
                    {
                        ouserloginresponse = ApplicationUsers.ValidateUser(User.UserName, User.UserSuffix, User.BankCode, User.PassWord, User.LoginType);
                    }
                    catch (Exception e)
                    {
                        ouserloginresponse.LoginStatus = "ERROR";
                        ouserloginresponse.LoginStatusCode = "IB400";
                        ouserloginresponse.LoginStatusDescription = e.Message;
                        log.Error(e.Message);
                        log.Error("LoginUser Response Error");
    
                    }
                }
                else  
                {
                    ouserloginresponse.LoginStatus = "ERROR";
                    ouserloginresponse.LoginStatusCode = "IB400";         
                    log.Error("LoginUser Response Null");
                
                }
                log.Info("PostValidateUserResponse End()");
                return ouserloginresponse;
            }
    
    
    [DataContract]
        public class UserLoginResponse
        {
            [DataMember]
            public string LoginStatus { get; set; }
    
            [DataMember]
            public Menu Menu { get; set; }
    
            [DataMember]
            public string LoginStatusDescription { get; set; }
    
            [DataMember]
            public string LoginStatusCode { get; set; }
    
            [DataMember]
            public Guid Token { get; set; }
    
            [DataMember]
            public string LoginComName { get; set; }
        }
    


     

    Thursday, November 19, 2015 1:39 AM

All replies

  • User1100692814 posted

    Hi ArunaMadu,

    Sorry but this is almost impossible for us to diagnose. The issue could be at a database level, ApplicationUsers.ValidateUser method or just simply done to the users bandwidth and any latency in the connection. Not to mention, if you are running it locally vs running it on a production server with low capacity.

    I suggest, using something like NewRelic to Performance monitor bad connections and requests. Postman is also great for catching and monitoring client to network traffic for server response times.

    A little tracing would also probably go a long way to helping you with Performance Benchmark Testing.

    Hope this helps.

    D

    Thursday, November 19, 2015 3:09 AM