question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

In CoreCLR, we have a list of knobs which can be specified.

In Mono, we can set some command line arguments (like --optimize=OPT or --gc=[sgen,boehm]) and environment variables (like GC_DONT_GC or MONO_GAC_PREFIX, see also https://linux.die.net/man/1/mono).

I think, it would be cool to have an ability to specify some of knobs/arguments as a part of Job.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
adamsitnikcommented, Sep 3, 2017

Done 😉

You can specify env variables or mono arguments per job now.

Example:

public class IntroCustomMonoArguments
{
    public class ConfigWithCustomArguments : ManualConfig
    {
        public ConfigWithCustomArguments()
        {
            // --optimize=MODE , -O=mode
            // MODE is a comma separated list of optimizations. They also allow
            // optimizations to be turned off by prefixing the optimization name with a minus sign.

            Add(Job.Mono.With(new[] { new MonoArgument("--optimize=inline") }).WithId("Inlining enabled"));
            Add(Job.Mono.With(new[] { new MonoArgument("--optimize=-inline") }).WithId("Inlining disabled"));
        }
    }

    [Benchmark]
    public void Sample()
    {
        ShouldGetInlined(); ShouldGetInlined(); ShouldGetInlined();
        ShouldGetInlined(); ShouldGetInlined(); ShouldGetInlined();
        ShouldGetInlined(); ShouldGetInlined(); ShouldGetInlined();
    }

    void ShouldGetInlined() { }
}

BenchmarkDotNet=v0.10.9.20170903-develop, OS=Windows 10 Redstone 1 (10.0.14393)
Processor=Intel Core i7-6600U CPU 2.60GHz (Skylake), ProcessorCount=4
Frequency=2742190 Hz, Resolution=364.6720 ns, Timer=TSC
  [Host]            : .NET Framework 4.7 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.2101.1
  Inlining disabled : Mono 5.0.1 (Visual Studio), 32bit 
  Inlining enabled  : Mono 5.0.1 (Visual Studio), 32bit 

Runtime=Mono  
Method Job Arguments Mean Error StdDev
Sample Inlining disabled –optimize=-inline 19.4252 ns 0.4406 ns 0.4525 ns
Sample Inlining enabled –optimize=inline 0.0000 ns 0.0000 ns 0.0000 ns
0reactions
AndreyAkinshincommented, Sep 4, 2017

Awesome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Runtime Transform Handles | Modeling
Get the Runtime Transform Handles package from Vadim Andriyanov and speed up your game development process. Find this & other Modeling options on...
Read more >
How to set a runtime Knob for a specific pipeline · Issue ...
In looking at the code, the knob has a RuntimeKnobSource and I can also see in the "Initalise Job" phase it loads the...
Read more >
Transform Handles - Runtime Editor Docs - Battlehub
Runtime Transform Handles are the runtime 3D controls that are used to manipulate items in the scene. There are three built-in transform tools...
Read more >
Archimatix: Introduction to Runtime Handles - YouTube
Runtime Handles is a feature of Archimatix that provides "hands-on" parametric control over the runtime model.
Read more >
How Do I Make Transform Handles In Runtime : r/Unity3D
I'm Working On A Level Editor For My Game And I Want Transform Handles For It Unlike What I'm Using Which Is Just...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found