示例#1
0
        public void TestInsertBatch10000()
        {
            Probe probe = new Probe(3, true);

            Insert(1);
            probe.Mark(1);
            Insert(10000);
            probe.End(10000);
            Check.LogInfo(LogCategories.General, "=================[ Insert Batch ]=================");
            Check.LogInfo(LogCategories.General, "First       : {0}", probe.Diff(0, 1));
            Check.LogInfo(LogCategories.General, "Next 10.000 : {0}", probe.Diff(1, 2));
            Check.LogInfo(LogCategories.General, "Time/Op     : {0}", probe.Diff(1, 2).TimePerOperation);
        }
示例#2
0
        public void TestSelectOverhead()
        {
            Probe       probe = new Probe(3, true);
            MailingList ml    = MailingList.Retrieve(1);

            probe.Mark(1);
            ml = MailingList.Retrieve(1);
            probe.End(1);
            Check.LogInfo(LogCategories.General, "=================[ Select ]=================");
            Check.LogInfo(LogCategories.General, "First       : {0}", probe.Diff(0, 1));
            Check.LogInfo(LogCategories.General, "Second      : {0}", probe.Diff(1, 2));
            Check.LogInfo(LogCategories.General, "Total       : {0}", probe);
            Check.LogInfo(LogCategories.General, "Overhead    : {0}", probe.Diff(0, 1) - probe.Diff(1, 2));
        }
示例#3
0
        public void TestInsertOverhead()
        {
            Probe probe = new Probe(3, true);

            Insert(1);
            probe.Mark(1);
            Insert(1);
            probe.End(1);
            Check.LogInfo(LogCategories.General, "=================[ Insert ]=================");
            Check.LogInfo(LogCategories.General, "First       : {0}", probe.Diff(0, 1));
            Check.LogInfo(LogCategories.General, "Second      : {0}", probe.Diff(1, 2));
            Check.LogInfo(LogCategories.General, "Total       : {0}", probe);
            Check.LogInfo(LogCategories.General, "Overhead    : {0}", probe.Diff(0, 1) - probe.Diff(1, 2));
        }
示例#4
0
        public void TestCachePerformance_Clear()
        {
            CacheManager.Clear();
            Probe probe = new Probe(3, true);

            for (int i = 10000; i < 20000; i++)
            {
                CacheManager.Insert(i.ToString(), i);
            }
            probe.Mark(1);
            CacheManager.Clear();
            probe.End(1);
            Check.LogInfo(LogCategories.General, "Insert 10000: {0}", probe.Diff(0, 1));
            Check.LogInfo(LogCategories.General, "Clear       : {0}", probe.Diff(1, 2));
            Check.LogInfo(LogCategories.General, "Total       : {0}", probe);
        }
示例#5
0
 public void TestInsertBatch1000()
 {
     // skip Jet/Access - simply too slow for my temper..
     if (Broker.ProviderName != "Jet")
     {
         Probe probe = new Probe(3, true);
         Insert(1);
         probe.Mark(1);
         Insert(1000);
         probe.End(1000);
         Check.LogInfo(LogCategories.General, "=================[ Insert Batch ]=================");
         Check.LogInfo(LogCategories.General, "First       : {0}", probe.Diff(0, 1));
         Check.LogInfo(LogCategories.General, "Next 1.000  : {0}", probe.Diff(1, 2));
         Check.LogInfo(LogCategories.General, "Time/Op     : {0}", probe.Diff(1, 2).TimePerOperation);
     }
 }
示例#6
0
 public void TestSelectBatch1000()
 {
     // skip Jet/Access - simply too slow for my temper..
     if (Broker.ProviderName != "Jet")
     {
         Insert(997);                   // assume first 3 exist
         Probe       probe = new Probe(3, true);
         MailingList ml    = MailingList.Retrieve(1);
         probe.Mark(1);
         IList list = MailingList.ListAll;
         probe.End(list.Count);
         Check.LogInfo(LogCategories.General, "=================[ Select Batch ]=================");
         Check.LogInfo(LogCategories.General, "First       : {0}", probe.Diff(0, 1));
         Check.LogInfo(LogCategories.General, "Next 1.000  : {0}", probe.Diff(1, 2));
         Check.LogInfo(LogCategories.General, "Time/Op     : {0}", probe.Diff(1, 2).TimePerOperation);
     }
 }
示例#7
0
        public void TestSelectBatch10000()
        {
            Insert(9997);               // assume first 3 exist
            Probe       probe = new Probe(4, true);
            MailingList ml    = MailingList.Retrieve(1);

            probe.Mark(1);
            IList list = MailingList.ListAll;

            probe.Mark(list.Count);
            SqlResult sr = Broker.Retrieve(typeof(MailingList), new Key(typeof(MailingList), true));

            probe.End(sr.RowsContained);
            Check.LogInfo(LogCategories.General, "=================[ Select Batch ]=================");
            Check.LogInfo(LogCategories.General, "First       : {0}", probe.Diff(0, 1));
            Check.LogInfo(LogCategories.General, "Next 10.000 : {0}", probe.Diff(1, 2));
            Check.LogInfo(LogCategories.General, "Time/Op     : {0}", probe.Diff(1, 2).TimePerOperation);
            Check.LogInfo(LogCategories.General, "Raw 10.000  : {0}", probe.Diff(2, 3));
            Check.LogInfo(LogCategories.General, "Time/RawOp  : {0}", probe.Diff(2, 3).TimePerOperation);
        }
示例#8
0
        public void TestInsertSelectBatch()
        {
            Probe probe = new Probe(3, true);

            Insert(1);
            probe.Mark(1);
            Insert(100000);
            probe.Mark(100000);
            Check.LogInfo(LogCategories.General, "=================[ Insert Large Batch ]=================");
            Check.LogInfo(LogCategories.General, "First Insert: {0}", probe.Diff(0, 1));
            Check.LogInfo(LogCategories.General, "Next 100.000: {0}", probe.Diff(1, 2));
            Check.LogInfo(LogCategories.General, "Time/Op     : {0}", probe.Diff(1, 2).TimePerOperation);
            probe = new Probe(3, true);
            MailingList ml = MailingList.Retrieve(1);

            probe.Mark(1);
            IList list = MailingList.ListAll;

            probe.End(list.Count);
            Check.LogInfo(LogCategories.General, "=================[ Select Large Batch ]=================");
            Check.LogInfo(LogCategories.General, "First Select: {0}", probe.Diff(0, 1));
            Check.LogInfo(LogCategories.General, "Next 100.000: {0}", probe.Diff(1, 2));
            Check.LogInfo(LogCategories.General, "Time/Op     : {0}", probe.Diff(1, 2).TimePerOperation);
        }
示例#9
0
		public void TestInsertSelectBatch()
		{
			Probe probe = new Probe( 3, true );
			Insert( 1 );
			probe.Mark( 1 );
			Insert( 100000 );
			probe.Mark( 100000 );
			Check.LogInfo( LogCategories.General, "=================[ Insert Large Batch ]=================" );
			Check.LogInfo( LogCategories.General, "First Insert: {0}", probe.Diff( 0, 1 ) );
			Check.LogInfo( LogCategories.General, "Next 100.000: {0}", probe.Diff( 1, 2 ) );
			Check.LogInfo( LogCategories.General, "Time/Op     : {0}", probe.Diff( 1, 2 ).TimePerOperation );
			probe = new Probe( 3, true );
			MailingList ml = MailingList.Retrieve( 1 );
			probe.Mark( 1 );
			IList list = MailingList.ListAll;
			probe.End( list.Count );
			Check.LogInfo( LogCategories.General, "=================[ Select Large Batch ]=================" );
			Check.LogInfo( LogCategories.General, "First Select: {0}", probe.Diff( 0, 1 ) );
			Check.LogInfo( LogCategories.General, "Next 100.000: {0}", probe.Diff( 1, 2 ) );
			Check.LogInfo( LogCategories.General, "Time/Op     : {0}", probe.Diff( 1, 2 ).TimePerOperation );
		}
示例#10
0
		public void TestSelectBatch10000()
		{
			Insert( 9997 ); // assume first 3 exist
			Probe probe = new Probe( 4, true );
			MailingList ml = MailingList.Retrieve( 1 );
			probe.Mark( 1 );
			IList list = MailingList.ListAll;
			probe.Mark( list.Count );
			SqlResult sr = Broker.Retrieve( typeof(MailingList), new Key( typeof(MailingList), true ) );
			probe.End( sr.RowsContained );
			Check.LogInfo( LogCategories.General, "=================[ Select Batch ]=================" );
			Check.LogInfo( LogCategories.General, "First       : {0}", probe.Diff( 0, 1 ) );
			Check.LogInfo( LogCategories.General, "Next 10.000 : {0}", probe.Diff( 1, 2 ) );
			Check.LogInfo( LogCategories.General, "Time/Op     : {0}", probe.Diff( 1, 2 ).TimePerOperation );
			Check.LogInfo( LogCategories.General, "Raw 10.000  : {0}", probe.Diff( 2, 3 ) );
			Check.LogInfo( LogCategories.General, "Time/RawOp  : {0}", probe.Diff( 2, 3 ).TimePerOperation );
		}
示例#11
0
		public void TestSelectBatch1000()
		{
			// skip Jet/Access - simply too slow for my temper..
			if( Broker.ProviderName != "Jet" )
			{
				Insert( 997 ); // assume first 3 exist
				Probe probe = new Probe( 3, true );
				MailingList ml = MailingList.Retrieve( 1 );
				probe.Mark( 1 );
				IList list = MailingList.ListAll;
				probe.End( list.Count );
				Check.LogInfo( LogCategories.General, "=================[ Select Batch ]=================" );
				Check.LogInfo( LogCategories.General, "First       : {0}", probe.Diff( 0, 1 ) );
				Check.LogInfo( LogCategories.General, "Next 1.000  : {0}", probe.Diff( 1, 2 ) );
				Check.LogInfo( LogCategories.General, "Time/Op     : {0}", probe.Diff( 1, 2 ).TimePerOperation );
			}
		}
示例#12
0
		public void TestSelectOverhead()
		{
			Probe probe = new Probe( 3, true );
			MailingList ml = MailingList.Retrieve( 1 );
			probe.Mark( 1 );
			ml = MailingList.Retrieve( 1 );
			probe.End( 1 );
			Check.LogInfo( LogCategories.General, "=================[ Select ]=================" );
			Check.LogInfo( LogCategories.General, "First       : {0}", probe.Diff( 0, 1 ) );
			Check.LogInfo( LogCategories.General, "Second      : {0}", probe.Diff( 1, 2 ) );
			Check.LogInfo( LogCategories.General, "Total       : {0}", probe );
			Check.LogInfo( LogCategories.General, "Overhead    : {0}", probe.Diff( 0, 1 ) - probe.Diff( 1, 2 ) );
		}
示例#13
0
		public void TestInsertBatch10000()
		{
			Probe probe = new Probe( 3, true );
			Insert( 1 );
			probe.Mark( 1 );
			Insert( 10000 );
			probe.End( 10000 );
			Check.LogInfo( LogCategories.General, "=================[ Insert Batch ]=================" );
			Check.LogInfo( LogCategories.General, "First       : {0}", probe.Diff( 0, 1 ) );
			Check.LogInfo( LogCategories.General, "Next 10.000 : {0}", probe.Diff( 1, 2 ) );
			Check.LogInfo( LogCategories.General, "Time/Op     : {0}", probe.Diff( 1, 2 ).TimePerOperation );
		}
示例#14
0
		public void TestInsertBatch1000()
		{
			// skip Jet/Access - simply too slow for my temper..
			if( Broker.ProviderName != "Jet" )
			{
				Probe probe = new Probe( 3, true );
				Insert( 1 );
				probe.Mark( 1 );
				Insert( 1000 );
				probe.End( 1000 );
				Check.LogInfo( LogCategories.General, "=================[ Insert Batch ]=================" );
				Check.LogInfo( LogCategories.General, "First       : {0}", probe.Diff( 0, 1 ) );
				Check.LogInfo( LogCategories.General, "Next 1.000  : {0}", probe.Diff( 1, 2 ) );
				Check.LogInfo( LogCategories.General, "Time/Op     : {0}", probe.Diff( 1, 2 ).TimePerOperation );
			}
		}
示例#15
0
		public void TestInsertOverhead()
		{
			Probe probe = new Probe( 3, true );
			Insert( 1 );
			probe.Mark( 1 );
			Insert( 1 );
			probe.End( 1 );
			Check.LogInfo( LogCategories.General, "=================[ Insert ]=================" );
			Check.LogInfo( LogCategories.General, "First       : {0}", probe.Diff( 0, 1 ) );
			Check.LogInfo( LogCategories.General, "Second      : {0}", probe.Diff( 1, 2 ) );
			Check.LogInfo( LogCategories.General, "Total       : {0}", probe );
			Check.LogInfo( LogCategories.General, "Overhead    : {0}", probe.Diff( 0, 1 ) - probe.Diff( 1, 2 ) );
		}
示例#16
0
		public void TestCachePerformance_Remove()
		{
			CacheManager.Clear();
			Probe probe = new Probe( 3, true );
			for( int i = 10000; i < 20000; i++ )
			{
				CacheManager.Insert( i.ToString(), i );
			}
			probe.Mark( 1 );
			for( int i = 10000; i < 20000; i++ )
			{
				CacheManager.Remove( i.ToString() );
			}
			probe.End( 1 );
			Check.LogInfo( LogCategories.General, "Insert 10000: {0}", probe.Diff( 0, 1 ) );
			Check.LogInfo( LogCategories.General, "Remove 10000: {0}", probe.Diff( 1, 2 ) );
			Check.LogInfo( LogCategories.General, "Total       : {0}", probe );
		}