Skip to main content

Multi Threaded NUnit Tests

Recently I needed to reproduce an Entity Framework deadlock issue. The test needed to run in NUnit, and involved firing off two separate threads. The trouble is that in NUnit, exceptions in threads terminate the parent thread without failing the test.

For example, here's a test that starts two threads: the first thread simply logs to the console, while the other thread turfs an exception. What I expected was that this test should fail. However, the test actually passes.

readonly ThreadStart[] delegates = {
    () => {
        Console.WriteLine("Nothing to see here");
    }, () => {
        throw new InvalidOperationException("Blow up");
    }
};

[Test] 
public void SimpleMultiThreading() {
    var threads = delegates.Select(d => new Thread(d)).ToList();
    foreach (var t in threads) {
        t.Start();
    }

    foreach (var t in threads) {
        t.Join();
    }
}

Peter Provost posted an article that describes how to make this test fail. It works by wrapping the thread code in a CrossThreadTestRunner class, that catches exceptions inside the thread, and rethrows the exception outside the thread via a Thread.Join call. Peter also posted another article describing how to use the CrossThreadTestRunner class.

Here's a partial code listing of the CrossThreadTestRunner class

public class CrossThreadTestRunner {
    private ThreadStart userDelegate;
    private Exception lastException;
    
    public CrossThreadTestRunner(ThreadStart userDelegate) {
        this.userDelegate = userDelegate;
    }
    
    public void Run() {
        Thread t = new Thread(new ThreadStart(MultiThreadedWorker));
        t.Start();
        t.Join();

        if (lastException != null) {
            ThrowExceptionPreservingStack(lastException);
        }
    }
    
    private void MultiThreadedWorker() {
        try {
            userDelegate.Invoke();
        }
        catch (Exception e) {
            lastException = e;
        }
    }
}

Peter's solution works if you are only using a single thread per test. If you wanted to run multiple threads in a test, some tweaks are required to the CrossThreadTestRunner class, since the CrossThreadTestRunner.Run method starts the thread, then does a Thread.Join to wait for the thread to complete. The problem with this is that it prevents threads from running in parallel, since Thread.Join blocks the calling thread until the target thread exits.

The change to allow for parallel thread execution is to split up the run method into a Start and a Join method, to mirror the corresponding methods on the Thread class. Here's the modified listing.

public class CrossThreadTestRunner {
    private ThreadStart userDelegate;
    private Exception lastException;
    private Thread thread;
    
    public CrossThreadTestRunner(ThreadStart userDelegate) {
        this.userDelegate = userDelegate;
        this.thread = new Thread(new ThreadStart(MultiThreadedWorker));
    }
    
    public void Start() {
        thread.Start();
    }
    
    public void Join() {
        thread.Join();

        if (lastException != null) {
            ThrowExceptionPreservingStack(lastException);
        }
    }
    
    private void MultiThreadedWorker() {
        try {
            userDelegate.Invoke();
        }
        catch (Exception e) {
            lastException = e;
        }
    }
}

Using the modified version of the CrossThreadTaskRunner, it's now possible to make the original test fail.

readonly ThreadStart[] delegates = {
    () => {
        Console.WriteLine("Nothing to see here");
    }, () => {
        throw new InvalidOperationException("Blow up");
    }
};

[Test] 
public void BetterMultiThreading() {
    var threads = delegates.Select(d => new CrossThreadTestRunner(d)).ToList();
    foreach (var t in threads) {
        t.Start();
    }

    foreach (var t in threads) {
        t.Join();
    }
}

One final tweak to turn this into a green test, is to add the ExpectedExceptionAttribute to the test method, to indicate that the test should fail with the given exception.

The final test looks something like the following

readonly ThreadStart[] delegates = {
    () => {
        Console.WriteLine("Nothing to see here");
    }, () => {
        throw new InvalidOperationException("Blow up");
    }
};

[Test]
[ExpectedException(typeof(InvalidOperationException))]
public void BetterMultiThreading() {
    var threads = delegates.Select(d => new CrossThreadTestRunner(d)).ToList();
    foreach (var t in threads) {
        t.Start();
    }

    foreach (var t in threads) {
        t.Join();
    }
}

Here's the full listing of the modified version of the CrossThreadTestRunner class.

class CrossThreadTestRunner {
        private Exception lastException;
        private readonly Thread thread;
        private readonly ThreadStart start;

        private const string RemoteStackTraceFieldName = "_remoteStackTraceString";
        private static readonly FieldInfo RemoteStackTraceField = typeof(Exception).GetField(RemoteStackTraceFieldName, BindingFlags.Instance | BindingFlags.NonPublic);

        public CrossThreadTestRunner(ThreadStart start) {
            this.start = start;
            this.thread = new Thread(Run);
            this.thread.SetApartmentState(ApartmentState.STA);
        }

        public void Start() {
            lastException = null;
            thread.Start();
        }

        public void Join() {
            thread.Join();

            if (lastException != null) {
                ThrowExceptionPreservingStack(lastException);
            }
        }

        private void Run() {
            try {
                start.Invoke();
            }
            catch (Exception e) {
                lastException = e;
            }
        }

        [ReflectionPermission(SecurityAction.Demand)]
        private static void ThrowExceptionPreservingStack(Exception exception) {
            if (RemoteStackTraceField != null) {
                RemoteStackTraceField.SetValue(exception, exception.StackTrace + Environment.NewLine);
            }
            throw exception;
        }
    }

The code for this article is on GitHub.

Comments

  1. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.

    Hadoop Training in Chennai

    ReplyDelete
  2. After reading this web site I am very satisfied simply because this site is providing comprehensive knowledge for you to audience. Thank you to the perform as well as discuss anything incredibly important in my opinion. We loose time waiting for your next article writing in addition to I beg one to get back to pay a visit to our website in
    java training in omr

    java training in annanagar | java training in chennai

    java training in marathahalli | java training in btm layout

    java training in rajaji nagar | java training in jayanagar

    ReplyDelete
  3. Really great post, Thank you for sharing This knowledge.Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place. Please keep it up!
    python training in omr

    python training in annanagar | python training in chennai

    python training in marathahalli | python training in btm layout

    python training in rajaji nagar | python training in jayanagar

    ReplyDelete
  4. Have you been thinking about the power sources and the tiles whom use blocks I wanted to thank you for this great read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out the new stuff you post
    Data Science Training in Chennai
    Data science training in bangalore
    Data science online training
    Data science training in pune
    Data science training in kalyan nagar
    selenium training in chennai

    ReplyDelete
  5. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.


    rpa training in Chennai | rpa training in velachery

    rpa training in tambaram | rpa training in sholinganallur

    rpa training in Chennai | rpa training in pune

    rpa online training | rpa training in bangalore

    ReplyDelete
  6. Thanks for your informative article, Your post helped me to understand the future and career prospects & Keep on updating your blog with such awesome article.
    python training in annanagar
    python training in chennai
    python training in chennai
    python training in Bangalore

    ReplyDelete
  7. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    Devops training in sholinganallur
    Devops training in velachery

    ReplyDelete
  8. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.

    Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

    Selenium Training in Bangalore | Best Selenium Training in Bangalore

    AWS Training in Bangalore | Amazon Web Services Training in Bangalore

    ReplyDelete
  9. Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here.
    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    ReplyDelete
  10. Really impressive post. I read it whole and going to share it with my social circules. I enjoyed your article and planning to rewrite it on my own blog.
    data science course malaysia

    ReplyDelete
  11. Alleyaaircool is the one of the best home appliances repair canter in all over Delhi we deals in repairing window ac, Split ac , fridge , microwave, washing machine, water cooler, RO and more other home appliances in cheap rates

    Window AC Repair in vaishali
    Split AC Repair in indirapuram
    Fridge Repair in kaushambi
    Microwave Repair in patparganj
    Washing Machine Repair in vasundhara
    Water Cooler Repair in indirapuram
    RO Service AMC in vasundhara
    Any Cooling System in vaishali
    Window AC Repair in indirapuram

    ReplyDelete
  12. Home Mart is a site about Home Improvement, Furniture, Home Appliances and many more.
    Check out the best
    furniture sale
    Dog Cages
    bedroom furniture nz
    entertainment unit

    ReplyDelete
  13. Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information.web design company in velachery

    ReplyDelete
  14. I would definitely thank the admin of this blog for sharing this information with us. Waiting for more updates from this blog admin.
    salesforce Training in Bangalore
    uipath Training in Bangalore
    blueprism Training in Bangalore

    ReplyDelete
  15. Wow...What an excellent informative blog, really helpful. Thank you so much for sharing such a wonderful article with us.keep updating..
    aws Training in Bangalore
    python Training in Bangalore
    hadoop Training in Bangalore
    angular js Training in Bangalore
    bigdata analytics Training in Bangalore

    ReplyDelete
  16. רציתי רק לשאול, אפשר לשתף את הפוסט בבלוג שלי?
    קבוצת גבאי פייסבוק

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. לגמרי פוסט שדורש שיתוף תודה.
    יהלומי מעבדה

    ReplyDelete
  19. לגמרי פוסט שדורש שיתוף תודה.
    מזנון צף

    ReplyDelete
  20. מזל שנתקלתי בכתבה הזאת. בדיוק בזמן
    מילוי שפתיים

    ReplyDelete
  21. תודה על השיתוף. מחכה לכתבות חדשות.
    הפקת אירועים

    ReplyDelete
  22. אין ספק שזה אחד הנושאים המעניינים. תודה על השיתוף.
    מוצרי תינוקות

    ReplyDelete
  23. Great Information,it has lot for stuff which is informative.I will share the post with my friend
    cat hanging necklace

    ReplyDelete
  24. אין ספק שהפוסט הזה דורש שיתוף. תודה.
    תמונה מודפסת על עץ

    ReplyDelete
  25. מזל שנתקלתי בכתבה הזאת. בדיוק בזמן
    מצלמות אבטחה לעסק

    ReplyDelete
  26. keep up the good work. this is an Assam post. this to helpful, i have reading here all post. i am impressed. thank you. this is our digital marketing training center. This is an online certificate course
    digital marketing training in bangalore | https://www.excelr.com/digital-marketing-training-in-bangalore

    ReplyDelete

  27. You write this post very carefully I think, which is easily understandable to me. Not only this, but another post is also good. As a newbie, this info is really helpful for me. Thanks to you.
    Tally ERP 9 Training
    tally classes
    Tally Training institute in Chennai
    Tally course in Chennai

    ReplyDelete
  28. Nice blog,I understood the topic very clearly,And want to study more like this.
    Data Scientist Course

    ReplyDelete
  29. תודה על השיתוף. מחכה לכתבות חדשות.
    חברת קידום אתרים

    ReplyDelete
  30. כתיבה מעולה, אהבתי. אשתף עם העוקבים שלי.
    מארזים ליולדת

    ReplyDelete
  31. סגנון כתיבה מרענן, תודה על השיתוף.

    קרקעות להשקעה

    ReplyDelete
  32. Attend The Data Science Courses From ExcelR. Practical Data Science Courses Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Science Courses.
    Data Science Courses
    Data Science Interview Questions

    ReplyDelete
  33. רציתי רק לשאול, אפשר לשתף את הפוסט בבלוג שלי?
    בית תוכנה

    ReplyDelete
  34. I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge. I truly adored reading your posting. Thank you!
    data analytics course
    supply chain analytics beginner's guide
    big data course in malaysia
    360DigiTMG
    big data analytics training in malaysia

    ReplyDelete
  35. Good post. I learn something new and challenging on sites I stumbleupon on a daily basis. It's always interesting to read content from other writers and practice a little something from their web sites.
    Digital Marketing Training Course in Chennai | Digital Marketing Training Course in Anna Nagar | Digital Marketing Training Course in OMR | Digital Marketing Training Course in Porur | Digital Marketing Training Course in Tambaram | Digital Marketing Training Course in Velachery

    ReplyDelete
  36. הייתי חייבת לפרגן, תודה על השיתוף.
    תמונה על קנבס

    ReplyDelete
  37. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
    Data Science Course in Pune
    Data Science Training in Pune

    ReplyDelete
  38. I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
    Data Analytics Course in Pune
    Data Analytics Training in Pune

    ReplyDelete
  39. I am impressed by the information that you have on this blog. It shows how well you understand this subject.
    Business Analytics Course in Pune
    Business Analytics Training in Pune

    ReplyDelete
  40. I don t have the time at the moment to fully read your site but I have bookmarked it and also add your RSS feeds. I will be back in a day or two. thanks for a great site.
    data science bootcamp malaysia

    ReplyDelete
  41. I am impressed by the information that you have on this blog. It shows how well you understand this subject.
    data analytics course
    big data analytics malaysia
    big data course

    ReplyDelete
  42. cool stuff you have and you keep overhaul every one of us
    data science bootcamp malaysia

    ReplyDelete
  43. I am impressed by the information that you have on this blog. It shows how well you understand this subject.
    data analytics course
    big data analytics malaysia
    big data course

    ReplyDelete
  44. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.
    Data Science Certification in Bangalore

    ReplyDelete
  45. Really impressive post. I read it whole and going to share it with my social circules. I enjoyed your article and planning to rewrite it on my own blog.

    Cat Doors

    ReplyDelete
  46. I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more.
    Data Science Course in Bangalore

    ReplyDelete
  47. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
    Data Science Training in Bangalore

    ReplyDelete
  48. Very interesting blog. Many blogs I see these days do not really provide anything that attracts others, but believe me the way you interact is literally awesome.You can also check my articles as well.

    Data Science In Banglore With Placements
    Data Science Course In Bangalore
    Data Science Training In Bangalore
    Best Data Science Courses In Bangalore
    Data Science Institute In Bangalore

    Thank you..

    ReplyDelete
  49. very interesting post.this is my first time visit here.i found so many interesting stuff in your blog especially its discussion..thanks for the post!
    Data Science Course in Hyderabad | Data Science Training in Hyderabad

    ReplyDelete
  50. You are in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you're doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject!
    Business Analytics Training in Hyderabad | Business Analytics Course in Hyderabad

    ReplyDelete
  51. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.
    data science course in guduvanchery

    ReplyDelete
  52. Thumbs up guys your doing a really good job. It is the intent to provide valuable information and best practices, including an understanding of the regulatory process.
    Cyber Security Course in Bangalore

    ReplyDelete
  53. Very nice blog and articles. I am really very happy to visit your blog. Now I am found which I actually want. I check your blog everyday and try to learn something from your blog. Thank you and waiting for your new post.
    Cyber Security Training in Bangalore

    ReplyDelete
  54. Nice service there are just few who are providing this service great job.


    Bastion Balance Korea

    ReplyDelete
  55. Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
    Artificial Intelligence Training in Chennai

    Ai Training in Chennai

    Artificial Intelligence training in Bangalore

    Ai Training in Bangalore

    Artificial Intelligence Training in Hyderabad | Certification | ai training in hyderabad

    Artificial Intelligence Online Training

    Ai Online Training

    Blue Prism Training in Chennai

    ReplyDelete
  56. Amazing post found to be very impressive while going through this post. Lots of appreciation to the blogger who took an initiative to write this particular blog. Thanks for sharing and keep posting such an informative content.

    360DigiTMG Cyber Security Course

    ReplyDelete
  57. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.
    visit here

    ReplyDelete
  58. Very interesting blog. Many blogs I see these days do not really provide anything that attracts others, but believe me the way you interact is literally awesome.You can also check my articles as well.

    360DigiTMG Data Science Course In Pune
    360DigiTMG Data Science Training In Pune

    Thank you..

    ReplyDelete
  59. Very interesting blog. Many blogs I see these days do not really provide anything that attracts others, but believe me the way you interact is literally awesome. I will instantly grab your rss feed to stay informed of any updates you make and as well take the advantage to share some latest information about

    CREDIT CARD HACK SOFTWARE which many are not yet informed of the recent technology.

    Thank so much, keep doing this great job.

    ReplyDelete
  60. If you don't mind, then continue this excellent work and expect more from your great blog posts
    data science course in noida

    ReplyDelete
  61. This blog is really helpful regarding all educational knowledge I earned. It covered a great area of subject which can assist a lot of needy people. Everything mentioned here is clear and very useful

    AI Training in Hyderabad

    ReplyDelete
  62. מרתק כמה שלא הבנתי כלום עד שקראתי את המאמר הנפלא הזה

    בניית בריכת שחייה מבטון

    ReplyDelete

  63. Additionally, this is an excellent article which I truly like studying. It's not everyday I have the option to see something similar to this.
    Data Science Training Institute in Bangalore

    ReplyDelete
  64. Very interesting blog. Many blogs I see these days do not really provide anything that attracts others, but believe me the way you interact is literally awesome.You can also check my articles as well.

    Data Science Course In Hyderabad
    Data Science Training In Hyderabad
    Best Data Science Course In Hyderabad

    Thank you..

    ReplyDelete
  65. Some time we never feel what we have done but for other that is big achievement


    Garage Door Repair Strathmore

    ReplyDelete
  66. Good Post! , it was so good to read and useful to improve my knowledge as an updated one, keep blogging.After seeing your article I want to say that also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts likethis. https://www.3ritechnologies.com/course/data-science-online-training/

    ReplyDelete
  67. חשבתי שאתקל בסתם עוד מאמר שטחי. טעיתי.
    איך לאלף כלב

    ReplyDelete
  68. Tremendous blog quite easy to grasp the subject since the content is very simple to understand. Obviously, this helps the participants to engage themselves in to the subject without much difficulty. Hope you further educate the readers in the same manner and keep sharing the content as always you do.

    Data Science training

    ReplyDelete
  69. Truly incredible blog found to be very impressive due to which the learners who ever go through it will try to explore themselves with the content to develop the skills to an extreme level. Eventually, thanking the blogger to come up with such an phenomenal content. Hope you arrive with the similar content in future as well.

    Digital Marketing training

    ReplyDelete
  70. Fantastic blog extremely good well enjoyed with the incredible informative content which surely activates the learners to gain the enough knowledge. Which in turn makes the readers to explore themselves and involve deeply in to the subject. Wish you to dispatch the similar content successively in future as well.

    artificial intelligence certification in bhilai

    ReplyDelete
  71. Having said that, it is pretty clear that only trained professionals can gain maximum exposure in this data-driven era and enjoy greater salary structure. data science course syllabus

    ReplyDelete
  72. Attend The Data Analyst Course From ExcelR. Practical Data Analyst Course Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Analyst Course.
    Data Analyst Course

    ReplyDelete
  73. It doesn't look too old, what so ever nice location.


    pittsburgh garage door repair

    ReplyDelete
  74. Good topic, this is going to help a lot of people get the whole concept


    fridge repair mississauga

    ReplyDelete
  75. This is a great article thanks for sharing this informative information.
    garage door repair strathmore

    ReplyDelete
  76. I’m happy I located this blog! From time to time, students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. nice one
    data science course in India

    ReplyDelete
  77. Seo company in Varanasi, India : Best SEO Companies in Varanasi, India: Hire Kashi Digital Agency, best SEO Agency in varanasi, india, who Can Boost Your SEO Ranking, guaranteed SEO Services; Free SEO Analysis.

    Best Website Designing company in Varanasi, India : Web Design Companies in varanasi We design amazing website designing, development and maintenance services running from start-ups to the huge players


    Wordpress Development Company Varanasi, India : Wordpress development Company In varanasi, india: Kashi Digital Agency is one of the Best wordpress developer companies in varanasi, india. Ranked among the Top website designing agencies in varanasi, india. wordpress website designing Company.

    E-commerce Website designing company varanasi, India : Ecommerce website designing company in Varanasi, India: Kashi Digital Agency is one of the Best Shopping Ecommerce website designing agency in Varanasi, India, which provides you the right services.

    ReplyDelete
  78. yes it happens with me as well. we feel the difference, convince and comfort. but how ever we are not simple free of worries as these old people were.nice article.


    garage door cable repair ottawa

    ReplyDelete
  79. I have bookmarked your site since this site contains significant data in it. You rock for keeping incredible stuff. I am a lot of appreciative of this site.
    data science course in noida

    ReplyDelete
  80. I really thank you for the valuable info on this great subject and look forward to more great posts ExcelR Data Analytics Course

    ReplyDelete
  81. Great article nicely presented and informative article.


    garage door moving slow

    ReplyDelete
  82. "I would like to say that, your blog is very nice, informative and amazing. Thanks for sharing your blog with us."
    Refrigerator Repair Service in Delhi

    ReplyDelete
  83. Extraordinary blog filled with an amazing content which no one has touched this subject before. Thanking the blogger for all the terrific efforts put in to develop such an awesome content. Expecting to deliver similar content further too and keep sharing as always.

    Digital Marketing training

    ReplyDelete
  84. מאמר מצוין נהניתי מכל רגע של קריאה

    מערכות אינטרקום

    ReplyDelete
  85. Great article nicely presented and informative article.


    legiongaragedoors.ca

    ReplyDelete
  86. Worth reading! Our experts also have given detailed inputs about these trainings & courses! Presenting here for your reference. Do checkout
    aws training in chennai & enjoy learning more about it.

    ReplyDelete
  87. Cool stuff you have and you keep overhaul every one of us
    data science in malaysia

    ReplyDelete
  88. Actually I read it yesterday I looked at most of your posts but I had some ideas about it . This article is probably where I got the most useful information for my research and today I wanted to read it again because it is so well written.
    Data Science Course in Bangalore

    ReplyDelete
  89. Sharing the same interest, Infycle feels so happy to share our detailed information about all these courses with you all! Big data training in chennai & get to know everything you want to about software trainings.

    ReplyDelete
  90. I need to communicate my deference of your composing aptitude and capacity to make perusers read from the earliest starting point as far as possible. I might want to peruse more up to date presents and on share my musings with you.
    big data training

    ReplyDelete
  91. Your content is very unique and understandable useful for the readers keep update more article like this.
    data science course in noida

    ReplyDelete
  92. Fantastic blog extremely good well enjoyed with the incredible informative content which surely activates the learners to gain the enough knowledge. Which in turn makes the readers to explore themselves and involve deeply in to the subject. Wish you to dispatch the similar content successively in future as well.

    Data Science certification in Raipur

    ReplyDelete
  93. Truly incredible blog found to be very impressive due to which the learners who ever go through it will try to explore themselves with the content to develop the skills to an extreme level. Eventually, thanking the blogger to come up with such an phenomenal content. Hope you arrive with the similar content in future as well.

    Digital Marketing Course in Raipur

    ReplyDelete
  94. Highly appreciable regarding the uniqueness of the content. This perhaps makes the readers feels excited to get stick to the subject. Certainly, the learners would thank the blogger to come up with the innovative content which keeps the readers to be up to date to stand by the competition. Once again nice blog keep it up and keep sharing the content as always.

    Data Science training

    ReplyDelete
  95. Wonderful blog found to be very impressive to come across such an awesome blog. I should really appreciate the blogger for the efforts they have put in to develop such an amazing content for all the curious readers who are very keen of being updated across every corner. Ultimately, this is an awesome experience for the readers. Anyways, thanks a lot and keep sharing the content in future too.

    Digital Marketing Course in Bhilai

    ReplyDelete
  96. Incredibly conventional blog and articles. I am realy very happy to visit your blog. Directly I am found which I truly need. Thankful to you and keeping it together for your new post.
    data science courses in noida

    ReplyDelete
  97. Your content is very unique and understandable useful for the readers keep update more article like this.
    data science course noida

    ReplyDelete
  98. Get Your Custom Socks Boxes – Wholesale Socks Packaging Boxes with Logo Made in Custom Shapes, sizes, and layouts. We offer quality and error-free packaging services with free shipping in all the UK. Today nobody wishes a hideous socks box on the shelves Our expert designers will come up tempting looks of socks boxes for you so your customers can complement your brand. We use a superior material for formulating custom printed paper socks boxes that retain them attractive for a long time.

    ReplyDelete
  99. Nice and very informative blog, glad to learn something through you.
    data analytics course delhi

    ReplyDelete
  100. Learn Amazon Web Services for making your career towards a sky-high with Infycle Technologies. Infycle Technologies is the best AWS training center in Chennai, providing courses for the AWS Training in Chennai in 200% hands-on practical training with professional trainers in the domain. Apart from the coaching, the placement interviews will be arranged for the students, so that they can set their career without any struggle. Of all that, 100% placement assurance will be given here. To have the best career, call 7502633633 to Infycle Technologies and grab a free demo to know more.Best AWS Training in Chennai

    ReplyDelete
  101. This is a brilliant article, Given such a great amount of data in it, These kind of articles keeps the clients enthusiasm for the site, and continue sharing more
    360DigiTMG data analytics course

    ReplyDelete
  102. I just finished reading your book Doe's Ways and wanted to tell you how much I enjoyed it.
    360DigiTMG hrdf contribution

    ReplyDelete
  103. Sharing the same interest, Infycle feels so happy to share our detailed information about all these courses with you all! Do check them out
    Best Hadoop training in chennai & get to know everything you want to about software trainings.

    ReplyDelete

Post a Comment

Popular posts from this blog

Basic Web Performance Testing With JMeter and Gatling

Introduction In this post I'll give a quick way to get some basic web performance metrics using both JMeter and Gatling . JMeter is a well known, open source, Java based tool for performance testing. It has a lot of features, and can be a little confusing at first. Scripts (aka Test Plans), are XML documents, edited using the JMeter GUI.  There are lots of options, supports a wide variety of protocols, and produces some OK looking graphs and reports. Gatling is a lesser known tool, but I really like it. It's a Scala based tool, with scripts written in a nice DSL. While the scripts require some basic Scala, they are fairly easy to understand and modify. The output is a nice looking, interactive, HTML page. Metrics   Below are the basic metrics gathered by both JMeter and Gatling . If you are just starting performance testing, these might be a good starting point . Response Time – Difference between time when request was sent and time when response has been fully rec

Generating Java Mixed Mode Flame Graphs

Overview I've seen Brendan Gregg's talk on generating mixed-mode flame graphs  and I wanted to reproduce those flamegraphs for myself. Setting up the tools is a little bit of work, so I wanted to capture those steps. Check out the Java in Flames post on the Netflix blog for more information. I've created github repo ( github.com/jerometerry/perf )  that contains the scripts used to get this going, including a Vagrantfile, and JMeter Test Plan. Here's a flame graph I generated while applying load (via JMeter) to the basic arithmetic Tomcat sample application. All the green stacks are Java code, red stacks are kernel code, and yellow stacks are C++ code. The big green pile on the right is all the Tomcat Java code that's being run. Tools Here's the technologies I used (I'm writing this on a Mac). VirtualBox 5.1.12 Vagrant 1.9.1 bento/ubuntu-16.04 (kernel 4.4.0-38) Tomcat 7.0.68 JMeter 3.1 OpenJDK 8 1.8.111 linux-tools-4.4.0-38 linux-to