Beispiel #1
0
        static void write()
        {
            Console.WriteLine(">>> Writing data.");

            var writer = new FastSeries.Writer("test.db");
            var start  = DateTime.Now;

            for (int i = 0; i < 7; ++i)
            {
                writer.WriteItem(0, DateTime.Now - start, i);
            }

            for (int i = 0; i < 9; ++i)
            {
                writer.WriteItem(1, DateTime.Now - start, i);
            }

            writer.Flush();

            for (int i = 0; i < 6; ++i)
            {
                writer.WriteItem(0, DateTime.Now - start, i);
            }

            for (int i = 0; i < 4; ++i)
            {
                writer.WriteItem(1, DateTime.Now - start, i);
            }

            writer.Close();
        }
Beispiel #2
0
        static void write()
        {
            System.Diagnostics.Stopwatch st = new System.Diagnostics.Stopwatch();
            st.Start();
            Console.WriteLine(">>> Writing data.");

            var  writer = new FastSeries.Writer("test.db");
            var  start  = DateTime.Now;
            Data data   = new Data {
                TableID   = 0,
                Time      = new TimeSpan(DateTime.Now.Ticks),
                NameField = "hello, world!!!!!".ToCharArray(),
                TypeField = 'I',
                DataField = BitConverter.GetBytes(345678901)
            };

            writer.WriteItem(data);
            writer.Flush();
            writer.Close();
            Debug.WriteLine(st.ElapsedTicks);
        }
Beispiel #3
0
        static void write()
        {
            Console.WriteLine(">>> Writing data.");

            var writer = new FastSeries.Writer("test.db");
            var start = DateTime.Now;

            for (int i = 0; i < 7; ++i)
                writer.WriteItem(0, DateTime.Now - start, i);

            for (int i = 0; i < 9; ++i)
                writer.WriteItem(1, DateTime.Now - start, i);

            writer.Flush();

            for (int i = 0; i < 6; ++i)
                writer.WriteItem(0, DateTime.Now - start, i);

            for (int i = 0; i < 4; ++i)
                writer.WriteItem(1, DateTime.Now - start, i);

            writer.Close();
        }