This is a quick reference for how to check execution time in C#. This may be helpful to others but basically keeping it for my reference; as many times when needed it I need to Google it. Following code is sample I implemented in the Zipping Assembly to test which implementation is faster.
Need to reference System.Diagnostics but the implementation is quiet simple.
Need to reference System.Diagnostics but the implementation is quiet simple.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Archive; using System.Diagnostics; using System.Threading; namespace TestConsole { class Program { static void Main(string[] args) { Stopwatch sw = new Stopwatch(); sw.Start(); ArchiveCreator ss = new WinBaseZipCreator(@"d:\testzip1.zip"); ArchiveObj xx = ss.GetArchieve(); xx.AddFile(@"d:\TEST1.txt"); xx.AddFile(@"d:\TEST2.txt"); xx.SaveArchive(); sw.Stop(); Console.WriteLine(sw.Elapsed); Thread.Sleep(5000); sw.Restart(); ArchiveCreator sss = new IonicZipCreator(@"d:\testzip2.zip"); ArchiveObj xxx = sss.GetArchieve(); xxx.AddFile(@"d:\TEST1.txt"); xxx.AddFile(@"d:\TEST2.txt"); xxx.SaveArchive(); sw.Stop(); Console.WriteLine(sw.Elapsed); Thread.Sleep(5000); sw.Restart(); ArchiveCreator ssss = new ZipShellCreator(@"d:\testzip3.zip"); ArchiveObj xxxx = ssss.GetArchieve(); xxxx.AddFile(@"d:\TEST1.txt"); xxxx.AddFile(@"d:\TEST2.txt"); xxxx.SaveArchive(); sw.Stop(); Console.WriteLine(sw.Elapsed); Console.ReadLine(); } } }
Your post is very helpful to quick reference to check execution time.
ReplyDeleteThis article is very good. check for check it QuickShortcutMaker Clash of Clans Mod APK
ReplyDeleteIf you are in Jaipur and need beautiful Escort Service in Jaipur or white skin Escort Service in Jaipur then you can simply book call girls in Jaipur from one of the best escort agency named Escort Service in Jaipur. It is No.1 premier escort agency and provide both incall or outcall facility to clients.Please click on the following link to check the official websites Escort Service in Jaipur
ReplyDeleteCall Girls in Kolkata
ReplyDeleteCall Girls in Mumbai
Call Girls in Lucknow
Call Girls in Gurgaon
Call Girls in Bangalore
Call Girls in Guwahati
======================
Escorts
======================
Escorts in Kolkata
Escorts in Mumbai
Escorts in Lucknow
Escorts in Gurgaon
Escorts in Bangalore
Escorts in Guwahati
Escort services
======================
Escort services in Kolkata
Mumbai Escort Service
Escort services in Lucknow
Escort services in Gurgaon
Escort services in Bangalore
Escort services in Guwahati
======================
Escort service
======================
Escort Service in Kolkata
Escort Service in Mumbai
Escort Service in Lucknow
Escort Service in Gurgaon
Escort Service in Bangalore
Escort Service in Guwahati
Faridabad Escorts
ReplyDeleteMumbai Escorts
Gurgaon Escorts
Bangalore Escorts
THANK YOU FOR VISITING MY WEBSITE:-
ReplyDeleterussian escorts in gurgaon
housewife escorts in gurgaon
gurgaon escort services
gurgaon escorts
escorts in gurgaon
escort services in gurgaon
gurgaon call girls
call girls in gurgaon
THANK YOU FOR VISITING MY WEBSITE:-
escorts in lucknow
ReplyDeletelucknow escorts
call girls in lucknow
escort service in lucknow
russian escorts in lucknow
lucknow escort services
lucknow call girls
��Call girls in jaipur
ReplyDelete��Call girls in Jaipur
��Call girls in Jaipur
��Call girls in Delhi
��Call girls in Guwahati
��Call girls in Guwahati
��Call girls in Guwahati
��Call girls in Guwahati
Very Good way of attracting your reader's attention is to write blog like you. Please do contact me on guwahaticallgirl@gmail.com for
ReplyDeleteGuwahati Call Girls
Guwahati Call Girls
Guwahati Call Girls
Guwahati Call Girls