 |

|
Problem is resolved
code giving the problem is
[TimerHitCountTest(5, Threads = 1, Unit = TimePeriod.Second)]
public void WebRequest()
{}
code working fine now is
[TimerHitCountTest(5, Threads = 1, Unit = TimePeriod.Minute)]
public void WebRequest()
{}
Thanks Adam
Regards
Ivan.........
A highly enthusiastic person meant for project leadership
|
|
|
|

|
I am getting an exception on screen telling me that I have attempted to divide by zero - I ignored this application and now none of my other files are opening hence I cannot get the unit performance of my Nunit scripts Please let me know how I can handel this divide by zero exception
I tried to change my nunit test code also however it does not help
Is there some provision to handle this exception of divide by zero in Ntime
Please advice me.
Regards
Ivan.....
A highly enthusiastic person meant for project leadership
|
|
|
|

|
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.DivideByZeroException: Attempted to divide by zero.
at NTime.RemoteLoader.LoadAssembly(String assembly)
at NTime.RemoteLoader.LoadAssembly(String assembly)
at NTime.NTimeMain.Reload()
at NTime.NTimeMain.Open()
at NTime.GUI.NTimeForm.menuOpen_Click(Object sender, EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItem.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Command.DispatchID(Int32 id)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
NTimeGUI
Assembly Version: 1.0.2.0
Win32 Version: 1.0.2.0
CodeBase: file:///C:/Program%20Files/Magic%20Image/NTime/bin/NTimeGUI.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
NTime.Framework
Assembly Version: 1.0.2.0
Win32 Version: 1.0.2.0
CodeBase: file:///C:/Program%20Files/Magic%20Image/NTime/bin/NTime.Framework.DLL
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
A highly enthusiastic person meant for project leadership
|
|
|
|

|
Send me your project (.sln) as simple as you can with this exception generating and i will check this
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
The problem is resolved
Code giving problem was:-
[TimerHitCountTest(0, Threads = 1, Unit = TimePeriod.Minute)]
public void WebRequest()
{}
Changed code to:-
[TimerHitCountTest(5, Threads = 1, Unit = TimePeriod.Minute)]
public void WebRequest()
{}
Every thing works fine now
Regards
Ivan.......
A highly enthusiastic person meant for project leadership
|
|
|
|

|
I have download the demo and now I want to use that.
I don't know how do get started with this.
vishal
|
|
|
|

|
I cannot install the project.
When I select the solution file, it says, that the solution could be under source control
and that's it. I cannot open the solution nor the projects
|
|
|
|

|
I used source control at home to storage my sources of ntime and that's way you cannot open project. Try this:
- Skip the warning and you should be able to load project into solution
or
- Create your own project from beginning and add ntime source files into it (remember to add appriopriate references)
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
I know it's a performance measuring tool, but it should handle exeptions in some way. A thrown exeption does nothing and the test appears to be still running - which is event worse. You can catch it of course - but then everything seems to be fine and green
NTime works fine with NUnit, though.
Janek
|
|
|
|

|
It handles exceptions as well. Look below to see my result of benchmarking GameScreenFlicking() function which throws SystemException inside resulting with status rejected
output:
Performance test result
=======================
Method: Void GameScreenFlicking()
Test type: Duration test (20 Millisecond, Threads=1)
Status: Rejected
Result: Unhandled exception
Exception: System.SystemException: MyTestException
at NTime.Tests.TestClass.GameScreenFlicking() in ...\NTime\PerformanceTests\Test.cs:line 77
PL:
Może w niektórych przypadkach to nie działa? Proponuję wobec tego napisać otoczke try-catch w danej funkcji i przekazywać wyjątek na zewnątrz do NTime-a poprzez forwardowanie (throw)
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
http://republika.pl/dailybuilds[^]
There you can find distributed build system for C++ Builder / Delphi and soon also for .NET compilers
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
well, is there a website to hold this great project
Regards,
unruledboy@hotmail.com
|
|
|
|
|

|
Excactly what I'm looking for, but it doesn't work.
I don't have time to hack/debug. Please let me know (at www.vectorsoft.net) when you've got a stable/mature version available.
|
|
|
|

|
Could you specify exactly what things are not working? Do You add reference to ntime.framework.dll as You should do it in tested projects? It is working with .net 1.1 since You can rebuild entire NTime solution with VS. NET 2005 to use it in .net 2.0
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
Hi Adam,
I'd so love to use your tool. However, it's utterly useless to me without support for config files. I bet you this limitation is stopping MANY other people from using the tool.
I believe you're supposed to do set it when you create your AppDomainSetup instance. I tried hacking your code to make it work, but I got a file not found exception. Solve it, and you'll have a proponent in me.
~Cheers
Sean
|
|
|
|

|
Hi Sean,
Thanks for this very important information from You, i will check my code in this week and probably put newer version in this weekend.
So summarize - you want your application to get some settings from name.exe.config file right? and NTime prevent to do so because appDomain uses own directory etc.? As i said i'll fix it today and put new version here, thanks again for enjoying this utility .
Adam
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
Nice tool, but after using it, I still prefer using Nick Weinholt's tool Performance Measurement Framework[^]. It gives a better set of result statistics to base your performance decision on.
John C
|
|
|
|

|
>> It gives a better set of result statistics to base your performance decision on.
Probably you're right because you talk about profiler which must show result very clearly, but my application is a more unique tool and it's not any next profiler like NumegaDevpartner profiler, AQTime, NPerf or NProf - they are working the same way with more or less additional features.
My .NTime tool provides unit testing - i think you don't understand the difference between performance tools and performance unit testing tools. NTime lets you type a boundaries like how fast the method should be in whole product cycle from design to deplyoment and maintenance. Next good thing in .NTime tool is that you can very simple attribute your methods as you work almost the same way as in NUnit, MBUnit, CSUnit etc. Performance Measurement Framework does it using delegates, invocation lists etc it is not comfortable to use - better solution is attributed methods like in NUnit, NTime etc.
Example about difference NTime and Performance Measurement Frame..:
a)Performance Measurement Framework gives you results how fast is your implemented method and you can decide to improve perfomance
b)NTime gives you result (also how fast is your methods but...) but in general result are whether your method test pass or fail, i mean if your method works slower after one month because you forgot about that method but it is invoking certain algorithm method which you changed and resulting in performance degradation then NTime will tell you that the first method has failed test, so you will remember that you changed something in other methods that resulted in perfomance degradation of tested method - you just get info that method pass or fail - and this depends on performance (not work/don't work logic like in nunit)
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
Its pretty obvious that you did not read anything from the link i posted. this is not a profiler, but a performance unit testing tool. It provides a more accurate time measurement (via the win32 api that it uses) and much more usable result report.
Please dont preach to people like they are idiots, especially when you have obviously not done YOUR homework.
John Conwell
|
|
|
|

|
>> Its pretty obvious that you did not read anything from the link i posted
You're wrong - i found harness (application - is it this you talk about?). And....
1) I do not see any function that uses WinApi to more accurate measure time (my NTime uses high resolution timers) - could you show me this api you talk about in harness?
2) You even still not understand. I dont need any graphics reports!!! These reports are good for profilers when i want to see my fixes in code in last build comparing to actual. I just need to know that my function has passed test and it's all i want. Because i am running big project about 800.000 lines code and i do not need to look for graphics report in each class but i want to have report that will show me that about 30 classes are to slow in my project containing 10.000 classes. Got it????? i think you'll not understand it ever. NTime is really unit testing. Which let you event very easy attribute your classes, i saw source code of harness and there is many complex function to use before getting started. Also where is the GUI to load some assemblies and point some methods to test??? NTime lets you open assembly in GUI and select with methods wiil be unit tested. Again - look forward for differences about performance unit testings and after- run profilers (some profilers are realtime like AQTime or devpartner profiler)
Read some good technical article of Marc Clifton about Classification of Unit Tests. Marc Clifton has written message in my discussion board and you can there see in his article very good knowledge you need.
If you think i'm not right in my sentences please provide here examples and facts what you can do more with harness (Measurement framework) and can't you do with NTime
Adam Slosarski
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
Hello,
How would I use NTime:
I dont need to timebox the test trial...i need to "put it under load" and record the resulting time.
I want to compare two different ways of doing things.
|
|
|
|

|
Hi,
You probably need tool to profile your application and test performance against two different fixes in your code. The tool you look for is QTime 3.0 (Automated QA company - commercial), NProf (free tool), Compuware Devpartner profiler (free) or other.
NTime is just as name says the tool to do a tests but not to profile and collect results each run to compare results. NTime tool need to specify time boundaries and let you keep your application not exceed this boundary, so you have to write code efficiency and perhaps you won't forget about slow functions because NTime will signal that your routine is going to be slow.
NTime is not a profiler, it is a performance black-box test.
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
Hi,
New NTime version is available to download.
* Bug fixes
* Added console mode to integrate with other applications, tools and addins
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
Hello,
Does NTime load config files like NUnit?
If i create a NTime perf test assembly, and want to use a app.config file this assembly, will NTime load the assembly if i postbuild copy app.config to xxxx.dll.config where the assembly is loaded from?
THis is a nice NUnit feature. Not exactly sure how it works tho...
|
|
|
|

|
Hi,
It's hard to answer, the source code doesn't implement any additional functionality about *.config files - the code is loading assemblies by default. Assemblies are loaded into separate application domain within NTime process. You have to find out how assemblies have to be loaded in the source code and debug it if necessary to see as it loads .config files. I am still just learning .net and didn't use appconfig files yet in my apps.
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
Hi,
New NTime version is available to download.
* Bug fixes
* Added console mode to integrate with other applications, tools and addins
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
New NTime version 1.3.0.0 from 31 March 2005 is available - it works with appconfigs now. new version you can find at www.gotdotnet.com or wait here few days in order to upload by me onto codeproject
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
What is the difference with NPerf (from Jonathan de Halleux)
(from this codeproject article: http://www.codeproject.com/gen/design/nperf.asp[^])
I haven't been able to test any out (currently my main focus is on the 'make it work, make it right' than the 'make it fast')
|
|
|
|

|
NPerf tool is rather interface-typed test model, you write method wich expects interface type and then you tell which assembly to test, in example you may provide "system" assembly which holds many interfaced collections and then you can quick get result of all interfaced objects which uses IDictionary or other Interface, so you can see time difference between objects inherited from the same interface (Interface typed test driven model). The reports are rather static or more dynamic when you provide your custom interfaces.
NTime is a test tool that do not depend on interfaces, of course you can also test interfaces but NPerf is a better solution when looking on difference for objects inherited from one interface (You'll write less code) but NPerf will not test your application blocks against performance the way the NTime does.
You can run both tools and use them together, they are mutually exclusive tools. NTime is other tool than NPerf.
If you are beginner programmer your focus on 'make it work' is right for you, later when you'll get experience you can think on 'make it fast'.
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
I am currently trying out the eXtreme Programming principles from Ron Jeffries Book. In which he mainly focusses on 'make it work'. By refacturing his code (dailly) he applies the make it right. I rather like his approach (I am still finding my own ballance). Almost all (agile) programming comes down to make it work, make it right, make it fast. (I AM still a beginner when it comes down to winform programming and all the .Net related stuff... Which does not mean that I don't focus on the other two aspects. I just didn't use tools until now DateTime differences in my code = UGLY ).
Thanks for explaining the differences between nTime and nPerf...
Great Article! I'll be using nTime soon.
|
|
|
|

|
That's fine you study such books. Those are very helpful in programming stage. When you be ready, think about NTime, NUnit and other helper tools, these apps will speed up your application and keep it free of bugs.
Thanks for enjoying NTime.
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
Hi,
New NTime version is available to download.
* Bug fixes
* Added console mode to integrate with other applications, tools and addins
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
So what about http://www.csunit.org/ ? What features would make me want to use your tool?
or Advance Unit Test ( http://aut.tigris.org/ )?
|
|
|
|

|
Your tool is a simple clone of NUnit or NUnit is a simple clone of your CSUnit, both have the same features and attributes. The AUT project is still without features that NTime implements.
NTime is a PERFORMANCE unit testing tool not a pass/failure logic unit testing. Read this document to see what are performance tests. This is one of first unique tool to do performance unit tests, not pass/failure tests instead.
NTime is appropriate application to test the code as it works with desired timings, these tests make sure your application still works without performance degradation.
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
I am familiar with performance tests. And aut really does monitor the time taken to execute a textfixture. These are reported by AUT. You can even see that on the screenshots of the project page http://aut.tigris.org/
Ok csUnit does not have that functionality but aut is ofcourse the best among unittest tools.
Where your tool could win some point is that you can monitor performance counters easily within a fixture and define tressholds on those to see it the fixture passes performance requirements. None of the current tools has that ability.
A unit test tests a unit of code for a specific outcome. That outcome could be that you expect a specific result in functionality but that could easily be a tresshold value too in the form of the difference of a performance counter begin and end values.
|
|
|
|
|

|
Of course you're right, i was probably thinking about CSUnit but saying about AUT. Does CSUnit run performance tests too?
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
Hi,
New NTime version is available to download.
* Bug fixes
* Added console mode to integrate with other applications, tools and addins
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
RemoteLoader.NormalizeTime, RemoteLoader.NormalizeHitcount and RemoteLoader.TimeToNanoseconds assume that the factor between seconds and minutes 1000 is, while it is 60.
The same goes for minutes to hours.
Corrected code:
private void NormalizeTime(ref long duration, out TimePeriod timePeriod, int precision)
{
int tp = (int)TimePeriod.Nanosecond;
while(duration >= (1 * precision))
{
if(tp < (int)TimePeriod.Second)
{
duration /= 1000;
tp++;
}
else if (tp < (int)TimePeriod.Hour)
{
duration /= 60;
tp++;
}
else
break;
}
timePeriod = (TimePeriod)tp;
}
private void NormalizeHitcount(ref double hitcount, ref TimePeriod timePeriod, int precision)
{
int tp = (int)timePeriod;
while(hitcount < (1 * precision))
{
if(tp < (int)TimePeriod.Second)
{
hitcount *= 1000;
tp++;
}
else if(tp < (int)TimePeriod.Hour)
{
hitcount *= 60;
tp++;
}
else
break;
}
timePeriod = (TimePeriod)tp;
}
private long TimeToNanoseconds(long duration, TimePeriod timePeriod)
{
switch(timePeriod)
{
case TimePeriod.Microsecond:
{
duration *= 1000;
break;
}
case TimePeriod.Millisecond:
{
duration *= 1000000;
break;
}
case TimePeriod.Second:
{
duration *= 1000000000;
break;
}
case TimePeriod.Minute:
{
duration *= 60000000000;
break;
}
case TimePeriod.Hour:
{
duration *= 3600000000000;
break;
}
}
return duration;
}
|
|
|
|

|
Of course, you're right, i don't know how i omitted this mistake, but i think i was expressed using cut/paste function I will fix NTime to provide correct minutes and hours calculation.
Thank you for your engage in bug searching? how did you found it - tracing source code first or using this tool on ready application.
Could you tell me your scenario, when do you use it this tool? Is this tool helpful or what would you like to NTime do more for unit testing?
Again, Thanks for this comment
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
I have to reply again,
It is currently also not so clear after your fix, the line:
while(hitcount < (1 * precision))
assumes that the time base (precision) is number of power to 10 (10^N) i.e. 1000 or 1000000 but for seconds and minutes there will be (60^N). I think i will correct this all you wrote, it will take me some time to fix, the problem is a little complex - there is many tests to evaluate whether fixed bug is not duplicated in other area.
Thanks for engaging in source code
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
The NTime tool has changed now - it contains bug fixes (one you found about calculations in normalizefunctions) and also NTime provides console mode batching - Now you could integrate this tool into VS addin because consoled mode provide you some feedback to your application.
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
There is no source code, I think people are crazy to run an executable when they don't know the author, and it is coming from an unknown source
Being in a minority of one, doesn't make you insane George Orwell However, in my case it does
|
|
|
|

|
The source code you can optionally install since you run installer, by the way you're right, i'll put the source code soon - maybe tomorrow, i haven't time for now.
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
You can download files separately without running executable (installer) file now. Just download source codes and/or SDK documentation.
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
Hi,
New NTime version is available to download.
* Bug fixes
* Added console mode to integrate with other applications, tools and addins
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|
|

|
Before i was developing the NTime tool, i've looked out on test-driven-model while reading about NUnit on msdn online article by Eric Gunnerson. I needed some tool to make performance tests too, because there wasn't that tool in the world. I think NTime is a one of few first tools that performs this task, your very well written theory in your article about tests gave me better things how to recognize kinds of tests and write it better in NTime.
Allright, I will contact you soon about AUT project.
Are you a founder of MyXaml technology that will be introduced in Windows Longhorn?
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|

|
Hi Marc,
New NTime version is available to download.
* Bug fixes
* Added console mode to integrate with other applications, tools and addins
Testing your code against performance will keep you running with good scalability and maintenance for years.
NTime.exe - the free tool for real developers of high scalability applications!
|
|
|
|
 |