Make profiling a part of continuous integration (.NET)
If you’re a .NET developer who doesn’t follow our ReSharper Ultimate blog, then you probably missed a couple of blog posts about two new cool features in our dotTrace and dotMemory .NET profilers. Why are we writing about them in the TeamCity blog? Because these features are closely related with TeamCity and CI in general: they allow you to make performance and memory profiling a part of your continuous integration builds. So what is this hype all about?
Performance profiling in CI
Let’s begin with dotTrace and performance profiling. Along with dotTrace 6.2, we released a dotTrace Plugin to TeamCity. It allows you to prevent application performance regression by profiling your integration tests. The workflow is pretty simple:
- Write an integration test that runs some performance-critical functionality in your application.
- In the plugin, set a performance threshold for this test, which is the execution time value in ms or value taken from previous successful builds.
Now, if the test exceeds its threshold, the plugin will fail the build and save the collected performance snapshot to build artifacts.
- Open the snapshot in dotTrace and find the exact cause of the performance issue.
More details on the plugin are available in this post.
Memory profiling in CI
Not so long time ago we released dotMemory Unit – an additional unit testing framework that allows you to write tests that check your code for all kinds of memory issues, including memory leaks, high memory traffic, etc. For example, here’s how easy it is to check memory for objects of some
Foo type with an NUnit test:
dotMemory.Check(memory => Assert.That( memory.GetObjects(where => where.Type.Is<foo>()).ObjectsCount, Is.EqualTo(0));</foo>
Now the time has come for the dotMemory Unit standalone launcher that can be used in CI. For TeamCity users, we have something even better: a dotMemory Unit plugin. This plugin adds the support for dotMemory Unit to all TeamCity .NET test runner types. This means you can run tests that use dotMemory Unit along with other tests on your CI Server.
For more information on the dotMemory Unit plugin, please see this blog post.
You’re welcome to give the plugins a try! Note that they are absolutely free, so this won’t cost you anything.
Subscribe to Blog updates
Thanks, we've got you!
Introducing AWS Connection: A New Approach for Working With AWS in TeamCity
We’ve introduced a new feature called the AWS Connection, which makes it possible to work with AWS credentials more flexibly and safely.
TeamCity 2022.10: Sakura UI, Improved Integration With Amazon AWS, Out-of-the-Box HTTPS Support, Google OAuth Authentication, and More.
TeamCity 2022.10 comes with the Sakura UI enabled by default, introduces many cloud-related features including the AWS credentials management system and out-of-the-box terminal access to AWS EC2-based build agents, and adds important improvements to VCS integrations. Server administrators will love the new streamlined way to implement HTTPS for on-premises TeamCity installations. Also, a new authentication module for using Google accounts and a number of long-requested features have been implemented.
Transition to native Git in TeamCity 2022.04 brings 10x fetch time reduction to IntelliJ Platform
Starting from version 2022.04, TeamCity switched to native Git on the server side for Git VCS connections. The switch should positively impact both performance and overall experience of working with Git repositories on the TeamCity server side.In this blog post, we’ll talk about the reasons for the …
TeamCity 2022.04: Parallel Tests, Improved Integration with Amazon AWS, Built-in Code Quality Analysis, Updated VCS Integrations, and more
TeamCity 2022.04 introduces the new Parallel Tests feature that delivers an extraordinary speed boost when testing your projects. New powerful code analysis features will cut the time you spend on code reviews and increase the maintainability of your projects. Users who run their builds in the cloud…