Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 466097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:26:40+00:00 2026-05-12T23:26:40+00:00

I use JMeter to test my web application. and my test case is to

  • 0

I use JMeter to test my web application.
and my test case is to add a record in database.
and then I set the “number of thread user” to 20, it means that it will simulate 20 users work at the same time.
and then I run the test case.
But finally i found the system didn’t create 20 records in database, but instead just create 13 records in database.

I want to know why this happened ?
Is it possible that because in my web application i didn’t add a “synchronized” in front of the add records method ? I used linq, If two user post a request to create a record to server at the same time, what will happen? Just create a record or can successfully create two records, or unknown ?

Following is the sample code for create a record in database:

       public int SaveEventGroup(int id, Models.Entities.EventGroup e, Nullable<int> setpublish)
    {
        try
        {
            Entities.EventGroup db;
            if (id == 0)
            {
                db = new Entities.EventGroup();
                db.CreatedBy = e.CreatedBy;
                db.CreateDatetime = DateTime.Now;
                db.Status = true;
            }
            else
            {
                db = this.GetEventGroup(id);
            }

            db.NameCN = e.NameCN;
            db.NameEN = e.NameEN;
            db.NameZH = e.NameZH;
            db.NamePT = e.NamePT;
            db.DisplayOrder = GetGroupMaxDisplayOrder() + 1;

            if (setpublish == null)
            {
                db.PublishStatus = false;
                db.PublishDatetime = null;
                db.UpdateDatetime = DateTime.Now;
                db.UpdatedBy = e.UpdatedBy;
            }

            if (id == 0)
                dataContext.AddToEventGroupSet(db);

            dataContext.SaveChanges();

            return db.Id;
        }
        catch (Exception ex)
        {
            log.Error(ex.Message, ex);
            throw ex;
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T23:26:40+00:00Added an answer on May 12, 2026 at 11:26 pm

    the database itself should be ACID compliant, so i doubt the issue is with the database when it comes to synchronization. if you insert a new record and that record is keyed by something like an auto-incrementing integer, the database isn’t going to stomp on that unless you tell it to update by that id, rather than insert a new record. but since you are not writing the SQL, who really knows what you are instructing the database to do.

    i’d suggest removing linq from the equation, and manually writing this up. what you are testing appears to be a very simple “upsert” operation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 271k
  • Answers 271k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The cases where that happens are cases when the Zip… May 13, 2026 at 1:38 pm
  • Editorial Team
    Editorial Team added an answer Specify a custom template for the ComboBox list and pass… May 13, 2026 at 1:38 pm
  • Editorial Team
    Editorial Team added an answer Coregions are used when the sequence of events does not… May 13, 2026 at 1:38 pm

Related Questions

I'm trying to improve performance under high load and would like to implement opcode
I use jmeter to record the requests and then perform a performance test. After
I'd like to use JMeter test that I can send a message to a
What's the best strategy to use when writing JMeters tests against a web application

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.