Exemple #1
0
 void Awake()
 {
     RESULT_DIRECTORY             = SnapshotGenerator.GetProjectPath() + RESULT_DIRECTORY;
     SUMMARY_STATISTICS_DIRECTORY = RESULT_DIRECTORY + SUMMARY_STATISTICS_DIRECTORY;
     SAMPLED_METRICS_DIRECTORY    = RESULT_DIRECTORY + SAMPLED_METRICS_DIRECTORY;
     SnapshotGenerator.DEFAULT_SNAPSHOT_DIRECTORY = RESULT_DIRECTORY + SnapshotGenerator.DEFAULT_SNAPSHOT_DIRECTORY;
     SnapshotGenerator.CreateDirectoryIfNeeded(RESULT_DIRECTORY);
     SnapshotGenerator.CreateDirectoryIfNeeded(SUMMARY_STATISTICS_DIRECTORY);
     SnapshotGenerator.CreateDirectoryIfNeeded(SAMPLED_METRICS_DIRECTORY);
     SnapshotGenerator.CreateDirectoryIfNeeded(SnapshotGenerator.DEFAULT_SNAPSHOT_DIRECTORY);
 }
Exemple #2
0
    public void LogTwoDimensionalExperimentSamples(string experimentDecriptorString, string measuredMetric, List <Vector2> values)
    {
        //csvWriter = new StreamWriter(measuredMetric + "_" + experimentDecriptorString + ".csv");
        string experimentSamplesDirectory = SAMPLED_METRICS_DIRECTORY + experimentDecriptorString + "/";

        SnapshotGenerator.CreateDirectoryIfNeeded(experimentSamplesDirectory);
        csvWriter = new StreamWriter(experimentSamplesDirectory + measuredMetric + ".csv");
        foreach (Vector2 value in values)
        {
            csvWriter.WriteLine(value.x + ", " + value.y);
        }
        csvWriter.Flush();
        csvWriter.Close();
    }