Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12823


Ignore:
Timestamp:
07/31/15 10:57:26 (9 years ago)
Author:
ascheibe
Message:

#2017 added a new mode to hive drain for extracting runs and storing them in a single file

Location:
branches/HeuristicLab.Tools/HeuristicLab.HiveDrain
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Tools/HeuristicLab.HiveDrain

    • Property svn:global-ignores set to
      .vs
  • branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain.csproj

    r12538 r12823  
    7575    </Compile>
    7676    <Compile Include="JobDownloader.cs" />
     77    <Compile Include="JobTaskOneFileDownloader.cs" />
    7778    <Compile Include="Plugin.cs" />
    7879    <Compile Include="Properties\AssemblyInfo.cs" />
  • branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/HiveDrainMainWindow.Designer.cs

    r9694 r12823  
    1 namespace HiveDrain {
     1namespace HeuristicLab.HiveDrain {
    22  partial class HiveDrainMainWindow {
    33    /// <summary>
     
    2929      this.downloadButton = new System.Windows.Forms.Button();
    3030      this.logView = new HeuristicLab.Core.Views.LogView();
     31      this.oneFileCheckBox = new System.Windows.Forms.CheckBox();
    3132      this.SuspendLayout();
    3233      //
     
    7374      this.logView.TabIndex = 4;
    7475      //
     76      // oneFileCheckBox
     77      //
     78      this.oneFileCheckBox.AutoSize = true;
     79      this.oneFileCheckBox.Location = new System.Drawing.Point(15, 44);
     80      this.oneFileCheckBox.Name = "oneFileCheckBox";
     81      this.oneFileCheckBox.Size = new System.Drawing.Size(102, 17);
     82      this.oneFileCheckBox.TabIndex = 5;
     83      this.oneFileCheckBox.Text = "Save as one file";
     84      this.oneFileCheckBox.UseVisualStyleBackColor = true;
     85      //
    7586      // HiveDrainMainWindow
    7687      //
     
    7889      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    7990      this.ClientSize = new System.Drawing.Size(842, 447);
     91      this.Controls.Add(this.oneFileCheckBox);
    8092      this.Controls.Add(this.logView);
    8193      this.Controls.Add(this.downloadButton);
     
    97109    private System.Windows.Forms.Button downloadButton;
    98110    private HeuristicLab.Core.Views.LogView logView;
     111    private System.Windows.Forms.CheckBox oneFileCheckBox;
    99112  }
    100113}
  • branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/HiveDrainMainWindow.cs

    r9694 r12823  
    55using HeuristicLab.Core;
    66
    7 namespace HiveDrain {
     7namespace HeuristicLab.HiveDrain {
    88  public partial class HiveDrainMainWindow : Form {
    99    public HiveDrainMainWindow() {
     
    2929      downloadButton.Enabled = false;
    3030
    31       JobDownloader jobDownloader = new JobDownloader(Environment.CurrentDirectory, pattern, Log);
     31      JobDownloader jobDownloader = new JobDownloader(Environment.CurrentDirectory, pattern, Log, oneFileCheckBox.Checked);
    3232      task = new Task(jobDownloader.Start);
    3333      task.ContinueWith(x => { Log.LogMessage("All tasks written, quitting."); EnableButton(); }, TaskContinuationOptions.OnlyOnRanToCompletion);
  • branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/JobDownloader.cs

    r9694 r12823  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.IO;
     
    627using HeuristicLab.Core;
    728
    8 
    9 namespace HiveDrain {
     29namespace HeuristicLab.HiveDrain {
    1030  /// <summary>
    1131  /// Retrieves all jobs and starts downloading their tasks
    1232  /// </summary>
    13   class JobDownloader {
     33  public class JobDownloader {
    1434    public string RootLocation { get; set; }
    1535
    1636    public string NamePattern { get; set; }
    1737
     38    public bool OneFile { get; set; }
     39
    1840    private ILog log;
    1941
    20     public JobDownloader(string location, string pattern, ILog log) {
     42    public JobDownloader(string location, string pattern, ILog log, bool oneFile = false) {
    2143      RootLocation = location;
    2244      NamePattern = pattern;
    2345      this.log = log;
     46      OneFile = oneFile;
    2447    }
    2548
     
    3457          log.LogMessage(String.Format("\"{0}\": {1}", j.Name, j.Id));
    3558
    36           JobTaskDownloader taskDownloader = new JobTaskDownloader(jobPath, j, limitSemaphore, log);
    37           taskDownloader.Start();
     59          if (OneFile) {
     60            JobTaskOneFileDownloader taskDownloader = new JobTaskOneFileDownloader(jobPath, j, limitSemaphore, log);
     61            taskDownloader.Start();
     62          } else {
     63            JobTaskDownloader taskDownloader = new JobTaskDownloader(jobPath, j, limitSemaphore, log);
     64            taskDownloader.Start();
     65          }
    3866        } else {
    3967          log.LogMessage(String.Format("\"{0}\": {1} ---> ignored", j.Name, j.Id));
  • branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/JobTaskDownloader.cs

    r12538 r12823  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.IO;
     
    829using HeuristicLab.Core;
    930
    10 namespace HiveDrain {
     31namespace HeuristicLab.HiveDrain {
    1132  /// <summary>
    1233  /// downloads all finished tasks for a job
    1334  /// </summary>
    14   class JobTaskDownloader {
     35  public class JobTaskDownloader {
    1536    public String RootLocation { get; set; }
    1637    public Job ParentJob { get; set; }
  • branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/Plugin.cs

    r9694 r12823  
    1 using System.Windows.Forms;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System.Windows.Forms;
    223using HeuristicLab.PluginInfrastructure;
    324
    4 namespace HiveDrain {
     25namespace HeuristicLab.HiveDrain {
    526  // Hive Drain HeuristicLab Application, based on the original code of apetrei's Hive Drain Console Application
    627  [Plugin("HeuristicLab.HiveDrain", "1.0.0.0")]
  • branches/HeuristicLab.Tools/HeuristicLab.HiveDrain/HeuristicLab.HiveDrain/TaskSerializer.cs

    r9694 r12823  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using HeuristicLab.Common;
    324
    4 
    5 namespace HiveDrain {
     25namespace HeuristicLab.HiveDrain {
    626  static class TaskSerializer {
    727    public static void Serialize(SerializerTask serializerTask) {
Note: See TracChangeset for help on using the changeset viewer.