예제 #1
0
        protected void RenderAndShow(Transaction tx, Tree root, int showEntries = 25)
        {
            if (Debugger.IsAttached == false)
            {
                return;
            }
            var path           = Path.Combine(Environment.CurrentDirectory, "test-tree.dot");
            var rootPageNumber = tx.Environment.State.GetTree(tx, root.Name).State.RootPageNumber;

            TreeDumper.Dump(tx, path, tx.GetReadOnlyPage(rootPageNumber), showEntries);

            var output = Path.Combine(Environment.CurrentDirectory, "output.svg");
            var p      = Process.Start(DebugStuff.FindGraphviz() + @"\bin\dot.exe", "-Tsvg  " + path + " -o " + output);

            p.WaitForExit();
            Process.Start(output);
        }
예제 #2
0
        private void RenderAndShow(Transaction tx, Tree root, int showEntries = 25)
        {
            if (Debugger.IsAttached == false)
            {
                return;
            }
            var path           = Path.Combine(Environment.CurrentDirectory, "test-tree.dot");
            var rootPageNumber = tx.GetTreeInformation(root).RootPageNumber;

            TreeDumper.Dump(tx, path, tx.GetReadOnlyPage(rootPageNumber), showEntries);

            var output = Path.Combine(Environment.CurrentDirectory, "output.svg");
            var p      = Process.Start(@"c:\Program Files (x86)\Graphviz2.30\bin\dot.exe", "-Tsvg  " + path + " -o " + output);

            p.WaitForExit();
            Process.Start(output);
        }
예제 #3
0
파일: TableStorage.cs 프로젝트: mow/ravendb
        public void RenderAndShow(Transaction tx, TableBase table, int showEntries = 25)
        {
            if (Debugger.IsAttached == false)
            {
                return;
            }

            var tree = env.CreateTree(tx, table.TableName);

            var path           = Path.Combine(System.Environment.CurrentDirectory, "test-tree.dot");
            var rootPageNumber = tree.State.RootPageNumber;

            TreeDumper.Dump(tx, path, tx.GetReadOnlyPage(rootPageNumber), showEntries);

            var output = Path.Combine(System.Environment.CurrentDirectory, "output.svg");
            var p      = Process.Start(FindGraphviz() + @"\bin\dot.exe", "-Tsvg " + path + " -o " + output);

            p.WaitForExit();
            Process.Start(output);
        }