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 ); }
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 ); } }
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 ); }
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 ) ); }
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 ); }
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 ); } }
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 ) ); }
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 ); }