Example #1
0
 public void init() throws Exception {
   Parameters params = getParameters();
   if (params.getRaw().isEmpty()) {
     throw new IllegalArgumentException("no FastA file was given as input!");
   }
   fastaReader = new FastaReader(params.getRaw().toArray()[0].toString());
 }
Example #2
0
  @Override
  public void init() throws Exception {
    Parameters p = getParameters();
    List<String> raw = p.getRaw();
    for (String string : raw) {
      System.out.println("HelloWorld Parameter: " + string);
    }

    Map<String, String> named = p.getNamed();
    Set<String> keySet = named.keySet();
    for (String key : keySet) {
      System.out.println("HelloWorld Parameter: " + key + " Wert: " + named.get(key));
    }

    List<String> unnamed = p.getUnnamed();
    for (String param : unnamed) {
      System.out.println("Unnamed Parameter " + param);
    }
  }
  @Override
  public void start(Stage stage) {

    Parameters parameters = getParameters();
    List<String> rawArguments = parameters.getRaw();

    List<String> file_paths = new LinkedList<String>();

    int size = rawArguments.size(); // un solo file / argomento in realtà

    for (int i = 0; i < size; i++) {
      String path_data_file = rawArguments.get(i);
      System.out.println(" * data file n." + (i + 1) + " : " + path_data_file);
      file_paths.add(path_data_file);
    }

    stage.setTitle("Cpu during joining");

    final NumberAxis xAxis = new NumberAxis();
    final NumberAxis yAxis = new NumberAxis();

    xAxis.setLabel("time");
    // xAxis.setTickUnit(10);

    yAxis.setLabel("CPU %");
    yAxis.setTickUnit(2);

    final LineChart<Number, Number> lineChart = new LineChart<Number, Number>(xAxis, yAxis);

    lineChart.setTitle("CPU during Joining and Cleanups");
    lineChart.setCreateSymbols(false);

    // add_line_to_chart(lineChart, file_paths.get(0), "from 3 to 4 nodes", 3, 80000);
    // add_line_to_chart(lineChart, file_paths.get(0), "from 4 to 5 nodes", 4, 95000);
    add_line_to_chart(lineChart, file_paths.get(0), "from 5 to 6 nodes", 5, 112000);

    Scene scene = new Scene(lineChart, 800, 600);

    stage.setScene(scene);
    stage.show();
  }
  @Override
  public void start(Stage stage) {
    final Parameters params = getParameters();
    final List<String> parameters = params.getRaw();

    if (parameters.size() != 1) {
      throw new RuntimeException(
          "Bad command line arguments, expected exactly one argument (XML file to load)");
    }

    final String fileToLoad = parameters.get(0);

    final ProfileContainer profiles;
    try {
      FileInputStream in = new FileInputStream(fileToLoad);
      profiles = new XMLSerializer().load(in);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }

    final TreeTableView<ITreeNode> treeTable = createTreeTableView(profiles);

    treeTable.setPrefSize(2000, 2000);
    stage.setTitle("Profiling results: " + fileToLoad);

    stage.setResizable(true);

    final Scene scene = new Scene(new Group(), 1000, 1000);

    final Group sceneRoot = (Group) scene.getRoot();
    sceneRoot.setAutoSizeChildren(true);

    sceneRoot.getChildren().add(treeTable);

    stage.setScene(scene);
    stage.show();
  }