configuredColumns.add(CSVSaveService.CSV_THREAD_COUNT2); if (saveConfig.saveUrl()) { configuredColumns.add(CSVSaveService.CSV_URL);
/** * Save the data of the sample result to a stream * * @param writer * stream to save objects into * @param context * context for xstream to allow nested objects * @param res * sample to be saved * @param save * configuration telling us what to save */ protected void saveSamplerData(HierarchicalStreamWriter writer, MarshallingContext context, SampleResult res, SampleSaveConfiguration save) { if (save.saveSamplerData(res)) { writeString(writer, TAG_SAMPLER_DATA, res.getSamplerData()); } if (save.saveUrl()) { final URL url = res.getURL(); if (url != null) { writeItem(url, context, writer); } } }
if (saveConfig.saveUrl()) { i++;
private void saveSamplerData(HierarchicalStreamWriter writer, MarshallingContext context, HTTPSampleResult res, SampleSaveConfiguration save) { if (save.saveSamplerData(res)) { writeString(writer, TAG_COOKIES, res.getCookies()); writeString(writer, TAG_METHOD, res.getHTTPMethod()); writeString(writer, TAG_QUERY_STRING, res.getQueryString()); writeString(writer, TAG_REDIRECT_LOCATION, res.getRedirectLocation()); } if (save.saveUrl()) { writeItem(res.getURL(), context, writer); } }
appendFields(saveConfig.saveSentBytes(), text, delim, CSV_SENT_BYTES); appendFields(saveConfig.saveThreadCounts(), text, delim, CSV_THREAD_COUNT1, CSV_THREAD_COUNT2); appendFields(saveConfig.saveUrl(), text, delim, CSV_URL); appendFields(saveConfig.saveFileName(), text, delim, CSV_FILENAME); appendFields(saveConfig.saveLatency(), text, delim, CSV_LATENCY);
/** {@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); }
text.append(sample.getAllThreads()); if (saveConfig.saveUrl()) { text.append(sample.getURL());