Diagnostics / News: Recent posts

Example program

As for now you can only use blocks to diagnose your program. Saving diagnosis data to file is not yet included too.

import diagnostic.*;
import diagnostic.diagnosis.*;

public class Main
{
public static void main(String args[])
{
Diagnostics d=new Diagnostics(); //uses no garbage collector while taking action
d.beginWork();
d.openBlock("The big one");
System.out.println("Hello world, I'm diagnosted right now!");
d.openBlock("Small one");
System.out.println(new java.util.Date());
d.closeBlock("Small one");
System.out.println("This part is in \"big one\" block");
d.closeBlock("The big one");
d.endWork();
Diagnosis diagnosis=d.getPlainTextDiagnosis("Plain text document name");
diagnosis.saveToFile("Plain.txt");
diagnosis=d.getHtmlDiagnosis("Html document name");
diagnosis.saveToFile("HTML.htm");
diagnosis=d.getXMLDiagnosis("XML document name");
diagnosis.saveToFile("XML.xml");
}
}... read more

Posted by Filip 2010-02-20