This project is read-only.

StopListeningAndReset

Jan 12, 2010 at 11:05 PM

Hi

I am using CTRhu with a windows forms app at runtime and I am inject an aspect at a specific point , so i want to remove also after the time passes (cause i want my app to be fast).

I have try both StopListening and StopListeningAndReset which would suit better to my needs with no results . Am I missing anything? I hope the engine can be stopped so to gain back the speed loss

Coordinator
Jan 12, 2010 at 11:07 PM
it could be a bug.
how do you know it's not working?

On Wed, Jan 13, 2010 at 1:05 AM, tolisss <notifications@codeplex.com> wrote:

From: tolisss

Hi

I am using CTRhu with a windows forms app at runtime and I am inject an aspect at a specific point , so i want to remove also after the time passes (cause i want my app to be fast).

I have try both StopListening and StopListeningAndReset which would suit better to my needs with no results . Am I missing anything? I hope the engine can be stopped so to gain back the speed loss

Read the full discussion online.

To add a post to this discussion, reply to this email (CThru@discussions.codeplex.com)

To start a new discussion for this project, email CThru@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Thanks,

Roy Osherove
www.TypeMock.com - Unit Testing, Plain Smart

Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
A blog for team leaders: http://5Whys.com
my .NET blog: http://www.ISerializable.com
Twitter: http://twitter.com/RoyOsherove
+972-524-655388 (GMT+2)
Jan 12, 2010 at 11:09 PM

App speed is low :(

Coordinator
Jan 13, 2010 at 5:41 AM
that is natural because all methods are profiled by default.
the key to making it faster is to listen to less methods (in ShouldIntercept)

On Wed, Jan 13, 2010 at 1:09 AM, tolisss <notifications@codeplex.com> wrote:

From: tolisss

App speed is low :(

Read the full discussion online.

To add a post to this discussion, reply to this email (CThru@discussions.codeplex.com)

To start a new discussion for this project, email CThru@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Thanks,

Roy Osherove
www.TypeMock.com - Unit Testing, Plain Smart

Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
A blog for team leaders: http://5Whys.com
my .NET blog: http://www.ISerializable.com
Twitter: http://twitter.com/RoyOsherove
+972-524-655388 (GMT+2)
Jan 13, 2010 at 11:55 AM

I hope i can make it faster

I only did a

CThruEngine.StartListening();

CThruEngine.StopListeningAndReset();

I have not added any aspects at all and my app performance is terrible, like it profile all methods

Can CThru support my needs or is it specific only for unit testing?

Coordinator
Jan 13, 2010 at 2:18 PM
you can try changing the code inside cthruengine  (shouldIntercept) to make it faster for specific namespaces etc.

On Wed, Jan 13, 2010 at 1:55 PM, tolisss <notifications@codeplex.com> wrote:

From: tolisss

I hope i can make it faster

I only did a

CThruEngine.StartListening();

CThruEngine.StopListeningAndReset();

I have not added any aspects at all and my app performance is terrible, like it profile all methods

Can CThru support my needs or is it specific only for unit testing?

Read the full discussion online.

To add a post to this discussion, reply to this email (CThru@discussions.codeplex.com)

To start a new discussion for this project, email CThru@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Thanks,

Roy Osherove
www.TypeMock.com - Unit Testing, Plain Smart

Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
A blog for team leaders: http://5Whys.com
my .NET blog: http://www.ISerializable.com
Twitter: http://twitter.com/RoyOsherove
+972-524-655388 (GMT+2)
Developer
Jan 13, 2010 at 6:22 PM

This is weird. CThru intercepts only what you tell it to. Each aspect has a ShouldIntercept method, so that you won't have degraded performance on methods you don't want to intercept.

You can try and find the CThruEngine.CallbackBeforeMethodCall method and comment out all lines but the first one. Or put eventArgs.Returns(InterceptBehavior.DoNotIntercept) instead. This way you make sure that nothing is intercepted. Please let us know if it works.

 

ulu

Jan 14, 2010 at 1:23 PM

Hi

I looked at your code at the cause of the problem is that when MockManager.Init() is called the system is slown down. And even if u stop the CThruEngine since there is no way to unitialize MockManager the system speed remain very slow almost unuable to me. Hope I am wrong and u can some how gain back the system speed

 

Coordinator
Jan 14, 2010 at 4:27 PM
that is the start of the profiling

On Thu, Jan 14, 2010 at 5:51 PM, tolisss <notifications@codeplex.com> wrote:

From: tolisss

Hi

I looked at your code at the cause of the problem is that when MockManager.Init() is called the system is slown down. And even if u stop the CThruEngine since there is no way to unitialize MockManager the system speed remain very slow almost unuable to me. Hope I am wrong and u can some how gain back the system speed

 

Read the full discussion online.

To add a post to this discussion, reply to this email (CThru@discussions.codeplex.com)

To start a new discussion for this project, email CThru@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Thanks,

Roy Osherove
www.TypeMock.com - Unit Testing, Plain Smart

Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
A blog for team leaders: http://5Whys.com
my .NET blog: http://www.ISerializable.com
Twitter: http://twitter.com/RoyOsherove
+972-524-655388 (GMT+2)
Jan 14, 2010 at 4:31 PM

cannot really understand what you mean here

 

Developer
Jan 16, 2010 at 10:52 AM

MockManager is a part of the Isolator API. I guess it cannot be un-initialized.

Do you mean that just calling MockManager.Init() (without any CThru calls) slows down your performance? Or you just guess looking at the code? Can you verify that?

Jan 16, 2010 at 11:30 AM

Hi

yes I have used directly only MockManager.Init() without any calls to CThruEngine. I am just wondering un-inittilaization of MockManger is it something we can expect do be implemented, or is not doable at all

Coordinator
Jan 16, 2010 at 2:03 PM
You're seeing normal behavior. everything becomes slower (MockManager is required)

On Sat, Jan 16, 2010 at 1:30 PM, tolisss <notifications@codeplex.com> wrote:

From: tolisss

Hi

yes I have used directly only MockManager.Init() without any calls to CThruEngine. I am just wondering un-inittilaization of MockManger is it something we can expect do be implemented, or is not doable at all

Read the full discussion online.

To add a post to this discussion, reply to this email (CThru@discussions.codeplex.com)

To start a new discussion for this project, email CThru@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Thanks,

Roy Osherove
www.TypeMock.com - Unit Testing, Plain Smart

Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
A blog for team leaders: http://5Whys.com
my .NET blog: http://www.ISerializable.com
Twitter: http://twitter.com/RoyOsherove
+972-524-655388 (GMT+2)
Developer
Jan 16, 2010 at 4:04 PM

I guess you can request the Un-initialization feature at the TypeMock site. You can't do it in CThru.