Comments (10)
@twenzel ah, so you're running the benchmark and the code inside the .DLL depends on values found inside the .config
file via ConfigurationManager
? Ok - do you know if there's a standard way to do that for a dependent assembly? The NBench.Runner.exe
has its own App.config that loads but I don't know about being able to load multiple ones if you catch my drift.
from nbench.
At the moment I don't know how to do this. May be if the assembly is loaded in a dedicated AppDomain. I'll check the NUnit source because they're supporting this feature.
from nbench.
@Aaronontheweb You can provide the file name via the ConfigurationFile
property on the AppDomainSetup
class.
from nbench.
@twenzel so would that require loading the test assembly into its own AppDomain
?
from nbench.
Yes. I guess this is the best option. When loading the test assembly into its own AppDomain
you have control over the config file, the base path, private bin path, shadow copying. You can also change the target framework version.
You can even unload the assembly/appDomain so you can execute multiple benchmarks with different assemblies (even in parallel).
from nbench.
Where can i find the Nbench.runner.exe config? I'm trying to get to an EF connection string in the test.
Thanks
from nbench.
@twenzel looks like we're going to need to add some AppDomain loading support for this - I don't anticipate this being a huge amount of work.
@laitang2000 should be inside the same folder as the NBench.Runner.exe
- if it's not in there you can add one.
from nbench.
@twenzel I'm going to be a bit delayed on adding support for that myself - would you like to take a stab at adding it and submitting a pull request?
from nbench.
Yes, you can assign this issue to me.
from nbench.
Closed by #75
from nbench.
Related Issues (20)
- .Net Core: NU1605 Detected package downgrade: System.Reflection.TypeExtensions HOT 4
- Bug: unable to propagate --concurrent setting to .NET Core executables via dotnet nbench
- The specified framework version '2.1' could not be parsed HOT 7
- Ability to have PerfSetup method per test instead of per class
- Need to add more flexible support for future .NET Core 2.* versions HOT 1
- dotnet-nbench can accidentally try to execute [assembly-name].deps.json instead of the assembly HOT 5
- Need to add support for using different benchmark values for different frameworks
- dotnet nbench command fails with the error "Version for package `dotnet-nbench` could not be resolved." HOT 1
- TestFixtureSource not supported HOT 2
- Problem with loading satellite assemblies (.resources) HOT 1
- ReadMe cuts off mid-explanation HOT 1
- Need to add .NET Core 3.0 support HOT 1
- RunTimeMilliseconds not working properly HOT 3
- dotnet exec needs a managed .dll or .exe extension HOT 1
- Linux: can't set processor affinity without being sudo in some environments HOT 1
- Fix NuGet symbol publishing
- Flaky integration test:
- NBench only detects Assemblies and lists them all as 1 test, no matter the number of tests in the assembly HOT 1
- NBench Exception: %Performance Counter% is not registered on this machine. Please Create it First.
- TestRunner ignores the TestPackage.OutputTargets list
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nbench.