Dovestech - 2011-10-08
private static double gen(String fileName, String randomLine)
{
    double queryLength = 0;
    String search = UUID.randomUUID().toString();
    double startQuery = System.currentTimeMillis();
    try
    {
        FileWriter fstream = new FileWriter(fileName,true);
        BufferedWriter out = new BufferedWriter(fstream);
        out.write(search + ": " + randomLine + "\n");
        out.close();            
    }
    catch (Exception e)
    {
        System.err.println("Error: " + e.getMessage());
    }
    queryLength = System.currentTimeMillis() - startQuery;
    queryLength = queryLength / 1000;
    return queryLength;
}