Esempio n. 1
0
		static void MemoryRelax (ref PerfTests perfTests)
		{
			perfTests = null;
			Console.WriteLine ();
			GC.Collect ();
			Thread.Sleep (500);
			perfTests = new PerfTests ();
			Console.WriteLine ();
		}
Esempio n. 2
0
		public static void Main ()
		{
			PerfTests perfTests = new PerfTests ();
        
			perfTests.ObjectModelPerfUsingSmallSizeFlavobacteriabacteriumTestData();
			MemoryRelax (ref perfTests);
			perfTests.ObjectModelPerfUsingLargeSizeFlavoBacteriabacteriumTestData();				
			MemoryRelax (ref perfTests);
			perfTests.MUMmerPerfTestUsingSmallSizeEcoliData();
			MemoryRelax (ref perfTests);
			perfTests.MUMmerPerfTestUsingLargeSizeEcoliData();
			MemoryRelax (ref perfTests);
			perfTests.NUCmerPerfTestUsingSmallSizeEcoliData();
			MemoryRelax (ref perfTests);
			perfTests.NUCmerPerfTestUsingMediumSizeEcoliData();
			MemoryRelax (ref perfTests);
			//perfTests.PaDeNAPerfUsingLargeSizeEulerTestData();
			//MemoryRelax (ref perfTests);
			perfTests.PaDeNAPerfUsingSmallSizeEulerTestData();
			MemoryRelax (ref perfTests);
			perfTests.PAMSAMPerfTestUsingMediumSizeTestData();
			MemoryRelax (ref perfTests);
			perfTests.PAMSAMPerfTestUsingLargeSizeTestData();
			MemoryRelax (ref perfTests);
			perfTests.SmithWatermanPerfTestUsingSmallSizeTestData();       
			MemoryRelax (ref perfTests);
			perfTests.SmithWatermanPerfTestUsingMediumSizeTestData();        
			MemoryRelax (ref perfTests);
			perfTests.NeedlemanWunschPerfTestUsingSmallSizeTestData();
			MemoryRelax (ref perfTests);
			perfTests.NeedlemanWunschPerfTestUsingMediumSizeTestData();
			MemoryRelax (ref perfTests);
			perfTests.BAMParserPerfTestUsingLargeSizeTestData();
			MemoryRelax (ref perfTests);
			perfTests.BAMParserPerfTestUsingVeryLargeSizeTestData();
			MemoryRelax (ref perfTests);
			perfTests.SAMParserPerfTestUsingLargeSizeTestData();
			MemoryRelax (ref perfTests);
			perfTests.SAMParserPerfTestUsingVeryLargeSizeTestData();
		}
Esempio n. 3
0
        private static unsafe void Main(string[] args)
        {
            var x = Marshal.AllocHGlobal(128);
            var y = Marshal.AllocHGlobal(128);

            Spreads.Native.Compression.shuffle((IntPtr)8, (IntPtr)16, (byte *)x, (byte *)y);


            Trace.Listeners.Add(new ConsoleListener());

            var tests = new PerfTests();

            tests.SimpleWriteReadBenchmark();

            Console.WriteLine("Finished");
            Console.ReadLine();
            //try
            //{
            //    //if (Directory.Exists("/localdata/shared_lmdb"))
            //    //{
            //    //    Directory.Delete("/localdata/shared_lmdb", true);
            //    //}
            //    var env = new LMDBEnvironment("/localdata/shared_lmdb", DbEnvironmentFlags.NoSync | DbEnvironmentFlags.WriteMap);
            //    env.MapSize = 512L * 1024 * 1024 * 1024;
            //    env.Open();

            //    // write 1M values and then read them

            //    var db = env.OpenDatabase("test", new DatabaseConfig(DbFlags.Create | DbFlags.IntegerKey)).Result;

            //    var count = 1_000_000;
            //    var lastValue = 0;
            //    var myupdates = 0;
            //    env.Write(txn => { db.Truncate(txn); txn.Commit(); });

            //    Thread.Sleep(5000);

            //    var sw = new Stopwatch();
            //    sw.Start();

            //    while (lastValue < count)
            //    {
            //        env.Write(txn =>
            //        {
            //            using (var c = db.OpenCursor(txn))
            //            {
            //                int key = default(int);

            //                if (c.TryGet(ref key, ref lastValue, CursorGetOption.Last))
            //                {
            //                    key++;
            //                    if (key - 1 == lastValue)
            //                    {
            //                        myupdates++;
            //                    }

            //                    lastValue = key;
            //                }

            //                c.Put(ref key, ref lastValue, CursorPutOptions.NoOverwrite);
            //                txn.Commit();
            //            }
            //        });
            //    }

            //    sw.Stop();
            //    env.Close().Wait();
            //    var elapsed = sw.ElapsedMilliseconds;
            //    File.WriteAllText($"/localdata/stat_{Process.GetCurrentProcess().Id}.txt", $"{myupdates} - {elapsed}");
            //}
            //catch (Exception ex)
            //{
            //    Console.WriteLine(ex);
            //}
        }