configuredColumns.add(CSVSaveService.CSV_ENCODING); if (saveConfig.saveSampleCount()) { configuredColumns.add(CSVSaveService.CSV_SAMPLE_COUNT); configuredColumns.add(CSVSaveService.CSV_ERROR_COUNT);
if (saveConfig.saveSampleCount()) { result = new StatisticalSampleResult(timeStamp, elapsed); } else { if (saveConfig.saveSampleCount()) { field = CSV_SAMPLE_COUNT; text = parts[i++];
appendFields(saveConfig.saveLatency(), text, delim, CSV_LATENCY); appendFields(saveConfig.saveEncoding(), text, delim, CSV_ENCODING); appendFields(saveConfig.saveSampleCount(), text, delim, CSV_SAMPLE_COUNT, CSV_ERROR_COUNT); appendFields(saveConfig.saveHostname(), text, delim, CSV_HOSTNAME); appendFields(saveConfig.saveIdleTime(), text, delim, CSV_IDLETIME);
writer.addAttribute(ATT_SENT_BYTES, String.valueOf(res.getSentBytes())); if (save.saveSampleCount()){ writer.addAttribute(ATT_SAMPLE_COUNT, String.valueOf(res.getSampleCount())); writer.addAttribute(ATT_ERROR_COUNT, String.valueOf(res.getErrorCount()));
/** {@inheritDoc} */ @Override public void marshal(Object obj, HierarchicalStreamWriter writer, MarshallingContext context) { super.marshal(obj, writer, context); // Save most things SampleSaveConfiguration prop = (SampleSaveConfiguration) obj; // Save the new fields - but only if they are true // This list MUST agree with the list in MyWrapper#shouldSerializeMember() createNode(writer,prop.saveBytes(),NODE_BYTES); createNode(writer,prop.saveSentBytes(),NODE_SENT_BYTES); createNode(writer,prop.saveUrl(),NODE_URL); createNode(writer,prop.saveFileName(),NODE_FILENAME); createNode(writer,prop.saveHostname(),NODE_HOSTNAME); createNode(writer,prop.saveThreadCounts(),NODE_THREAD_COUNT); createNode(writer,prop.saveSampleCount(),NODE_SAMPLE_COUNT); createNode(writer,prop.saveIdleTime(),NODE_IDLE_TIME); createNode(writer, prop.saveConnectTime(), NODE_CONNECT_TIME); }
if (saveConfig.saveSampleCount()) {