Package desmoj.core.report

Examples of desmoj.core.report.FlexReporterBuilder$Row


        Lists.newArrayList("column1", "column2", "column3"), Pql.getColumnLabels(resultSet));
  }

  @Test
  public void testGetRowStringValues() {
    Row row = new Row();
    row.getValues().addAll(Lists.newArrayList(textValue1, booleanValue1, numberValue2));
    assertEquals(Lists.newArrayList("value1", "false", "1.02"), Pql.getRowStringValues(row));
  }
View Full Code Here


    assertEquals(Lists.newArrayList("value1", "false", "1.02"), Pql.getRowStringValues(row));
  }

  @Test
  public void testCombineResultSet() {
    Row row1 = new Row();
    row1.getValues().addAll(Lists.newArrayList(textValue1, booleanValue1, numberValue1));

    Row row2 = new Row();
    row2.getValues().addAll(Lists.newArrayList(textValue2, booleanValue2, numberValue2));

    Row row3 = new Row();
    row3.getValues().addAll(Lists.newArrayList(textValue3, booleanValue3, numberValue3));

    ResultSet resultSet1 = new ResultSet();
    resultSet1.getColumnTypes().addAll(Lists.newArrayList(column1, column2, column3));
    resultSet1.getRows().addAll(Lists.newArrayList(row1, row2));
View Full Code Here

        combinedResultSet.getRows().get(2).getValues());
  }

  @Test(expected = IllegalArgumentException.class)
  public void testCombineResultSet_badColumns() {
    Row row1 = new Row();
    row1.getValues().addAll(Lists.newArrayList(textValue1, booleanValue1, numberValue1));

    Row row2 = new Row();
    row2.getValues().addAll(Lists.newArrayList(textValue2, booleanValue2, numberValue2));

    Row row3 = new Row();
    row3.getValues().addAll(Lists.newArrayList(textValue3, booleanValue3));

    ResultSet resultSet1 = new ResultSet();
    resultSet1.getColumnTypes().addAll(Lists.newArrayList(column1, column2, column3));
    resultSet1.getRows().addAll(Lists.newArrayList(row1, row2));
View Full Code Here

        Lists.newArrayList("column1", "column2", "column3"), Pql.getColumnLabels(resultSet));
  }

  @Test
  public void testGetRowStringValues() {
    Row row = new Row();
    row.getValues().addAll(Lists.newArrayList(textValue1, booleanValue1, numberValue2));
    assertEquals(Lists.newArrayList("value1", "false", "1.02"), Pql.getRowStringValues(row));
  }
View Full Code Here

    assertEquals(Lists.newArrayList("value1", "false", "1.02"), Pql.getRowStringValues(row));
  }

  @Test
  public void testCombineResultSet() {
    Row row1 = new Row();
    row1.getValues().addAll(Lists.newArrayList(textValue1, booleanValue1, numberValue1));

    Row row2 = new Row();
    row2.getValues().addAll(Lists.newArrayList(textValue2, booleanValue2, numberValue2));

    Row row3 = new Row();
    row3.getValues().addAll(Lists.newArrayList(textValue3, booleanValue3, numberValue3));

    ResultSet resultSet1 = new ResultSet();
    resultSet1.getColumnTypes().addAll(Lists.newArrayList(column1, column2, column3));
    resultSet1.getRows().addAll(Lists.newArrayList(row1, row2));
View Full Code Here

        combinedResultSet.getRows().get(2).getValues());
  }

  @Test(expected = IllegalArgumentException.class)
  public void testCombineResultSet_badColumns() {
    Row row1 = new Row();
    row1.getValues().addAll(Lists.newArrayList(textValue1, booleanValue1, numberValue1));

    Row row2 = new Row();
    row2.getValues().addAll(Lists.newArrayList(textValue2, booleanValue2, numberValue2));

    Row row3 = new Row();
    row3.getValues().addAll(Lists.newArrayList(textValue3, booleanValue3));

    ResultSet resultSet1 = new ResultSet();
    resultSet1.getColumnTypes().addAll(Lists.newArrayList(column1, column2, column3));
    resultSet1.getRows().addAll(Lists.newArrayList(row1, row2));
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public Reporter createReporter() {
    FlexReporterBuilder builder;
    Row row;

    builder = new FlexReporterBuilder("MessageCrossbars", 6100);
    row = builder.openRow();
    row.addHeadingCell("Title");
    row.addHeadingCell("");
    row.addHeadingCell("(Re)set");
    row.addHeadingCell("MsgsRec");
    row.addHeadingCell("MsgsDeli");
    row.addHeadingCell("MsgsLost");
    row.addHeadingCell("Activated directly");
    row.addHeadingCell("Activated indirectly");
    row.addHeadingCell("Aborted");
    row.addHeadingCell("Obs");
    row.addHeadingCell("Qmax");
    row.addHeadingCell("Qnow");
    row.addHeadingCell("Qavg");
    row.addHeadingCell("max.Wait");
    row.addHeadingCell("avg.Wait");
    row.closeRow();

    row = builder.openRow();
    row.addCell(getName());
    row.addCell("Global:");
    row.addCell(resetAt());
    row.addCell(getReceivedMessages());
    row.addCell(getDeliveredMessages());
    row.addCell(getLostMessages());
    row.addCell(getProcessActivations());
    row.addCell("n/a");
    row.addCell(getInterruptedWaits());
    row.addCell(getObservations());
    row.addCell(passivatedProcessesQueue.maxLength());
    row.addCell(passivatedProcessesQueue.length());
    row.addCell(passivatedProcessesQueue.averageLength());
    row.addCell(passivatedProcessesQueue.maxWaitTime());
    row.addCell(passivatedProcessesQueue.averageWaitTime());
    row.closeRow();

    row = builder.openRow();
    row.addCell("").addHeadingCell("Message channels").addCell("").addCell("").addCell("").addCell("").addCell("")
        .addCell("").addCell("").addCell("").addCell("").addCell("").addCell("").addCell("").addCell("")
        .closeRow();

    for (MessageChannel<T> ch : messageChannelsByName.values()) {
      row = builder.openRow();
      row.addCell("");
      row.addCell(ch.getName());
      row.addCell(ch.resetAt());
      row.addCell(ch.getReceivedMessages());
      row.addCell(ch.getDeliveredMessages());
      row.addCell(ch.getLostMessages());
      row.addCell(ch.getDirectProcessActivations());
      row.addCell(ch.getIndirectProcessActivations());
      row.addCell(ch.getInterruptedWaits());
      row.addCell(ch.getObservations());
      row.addCell(ch.getPassivatedProcessesQueue().maxLength());
      row.addCell(ch.getPassivatedProcessesQueue().length());
      row.addCell(ch.getPassivatedProcessesQueue().averageLength());
      row.addCell(ch.getPassivatedProcessesQueue().maxWaitTime());
      row.addCell(ch.getPassivatedProcessesQueue().averageWaitTime()).closeRow();
    }

    return builder.build();
  }
View Full Code Here

TOP

Related Classes of desmoj.core.report.FlexReporterBuilder$Row

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.