|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Forcing JIT of assembliesIs there any simple way of forcing load and JIT of assemblies? In my NUnit
tests timing information is skewed because of assembly load and JIT time the first time each assembly is used, and I'd like a simple way of making sure all the assemblies are pre-loaded and JITted if possible. "Clive Dixon" <clived.noluncheonm***@digita.noluncheonmeat.com> wrote in Assemblies aren't JIT compiled when loaded, methods are JIT compiled at message news:eKOe9tmIGHA.2668@tk2msftngp13.phx.gbl... | Is there any simple way of forcing load and JIT of assemblies? In my NUnit | tests timing information is skewed because of assembly load and JIT time the | first time each assembly is used, and I'd like a simple way of making sure | all the assemblies are pre-loaded and JITted if possible. | | | first call, so you need to execute each of them first before you can assume they are compiled. Not sure why you are combining NUnit test with instrumenting. Willy. >Assemblies aren't JIT compiled when loaded, methods are JIT compiled at Yes I know that, which is why I said load *AND* JIT (JITting of all methods > first call being implicit in my question if not explicit). > Not sure why you are combining NUnit test with I was just getting a quick and dirty estimate of timings of certain > instrumenting. operations using exisiting NUnit tests. It's not "instrumenting". It's not at all important in my scenario but it got me thinking about the more general case of how you would factor out time taken to load/JIT where you were trying to do accurate timings. I don't know anything about performance counters for example and whether they can account for this (the MSDN, and other for that matter, documentation on the subject is rather opaque IMO and there seems to be no really simple cut-'n'-paste "this is how to use performance counters in a piece of code to do function timings" examples to get you started as far as I can find). Show quote "Willy Denoyette [MVP]" <willy.denoye***@telenet.be> wrote in message news:OOKT3gnIGHA.3856@TK2MSFTNGP12.phx.gbl... > > "Clive Dixon" <clived.noluncheonm***@digita.noluncheonmeat.com> wrote in > message news:eKOe9tmIGHA.2668@tk2msftngp13.phx.gbl... > | Is there any simple way of forcing load and JIT of assemblies? In my > NUnit > | tests timing information is skewed because of assembly load and JIT time > the > | first time each assembly is used, and I'd like a simple way of making > sure > | all the assemblies are pre-loaded and JITted if possible. > | > | > | > > Assemblies aren't JIT compiled when loaded, methods are JIT compiled at > first call, so you need to execute each of them first before you can > assume > they are compiled. Not sure why you are combining NUnit test with > instrumenting. > > Willy. > > > > You can try procompile assemblies with NGEN tool
Show quote "Clive Dixon" <clived.noluncheonm***@digita.noluncheonmeat.com> wrote in message news:ecvQoUyIGHA.3816@TK2MSFTNGP12.phx.gbl... > >Assemblies aren't JIT compiled when loaded, methods are JIT compiled at >> first call > > Yes I know that, which is why I said load *AND* JIT (JITting of all > methods being implicit in my question if not explicit). > >> Not sure why you are combining NUnit test with >> instrumenting. > > I was just getting a quick and dirty estimate of timings of certain > operations using exisiting NUnit tests. It's not "instrumenting". It's not > at all important in my scenario but it got me thinking about the more > general case of how you would factor out time taken to load/JIT where you > were trying to do accurate timings. I don't know anything about > performance counters for example and whether they can account for this > (the MSDN, and other for that matter, documentation on the subject is > rather opaque IMO and there seems to be no really simple cut-'n'-paste > "this is how to use performance counters in a piece of code to do function > timings" examples to get you started as far as I can find). > > "Willy Denoyette [MVP]" <willy.denoye***@telenet.be> wrote in message > news:OOKT3gnIGHA.3856@TK2MSFTNGP12.phx.gbl... >> >> "Clive Dixon" <clived.noluncheonm***@digita.noluncheonmeat.com> wrote in >> message news:eKOe9tmIGHA.2668@tk2msftngp13.phx.gbl... >> | Is there any simple way of forcing load and JIT of assemblies? In my >> NUnit >> | tests timing information is skewed because of assembly load and JIT >> time >> the >> | first time each assembly is used, and I'd like a simple way of making >> sure >> | all the assemblies are pre-loaded and JITted if possible. >> | >> | >> | >> >> Assemblies aren't JIT compiled when loaded, methods are JIT compiled at >> first call, so you need to execute each of them first before you can >> assume >> they are compiled. Not sure why you are combining NUnit test with >> instrumenting. >> >> Willy. >> >> >> >> > > |
|||||||||||||||||||||||