com.emc.mongoose.base.logging.OperationTraceCsvBatchLogMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mongoose-base Show documentation
Show all versions of mongoose-base Show documentation
Mongoose is a high-load storage performance testing tool
package com.emc.mongoose.base.logging;
import com.emc.mongoose.base.item.Item;
import com.emc.mongoose.base.item.op.Operation;
import java.util.ArrayList;
import java.util.List;
import org.apache.logging.log4j.message.AsynchronouslyFormattable;
/** Created by andrey on 17.11.16. */
@AsynchronouslyFormattable
public final class OperationTraceCsvBatchLogMessage>
extends LogMessageBase {
private final List> opTraceRecords;
private final int size;
public OperationTraceCsvBatchLogMessage(final List opsResults, final int from, final int to) {
size = to - from;
opTraceRecords = new ArrayList<>(size);
for (int i = from; i < to; i++) {
opTraceRecords.add(new OperationTraceRecord<>(opsResults.get(i)));
}
}
@Override
@SuppressWarnings("unchecked")
public final void formatTo(final StringBuilder strb) {
if (size > 0) {
for (int i = 0; i < size; i++) {
opTraceRecords.get(i).format(strb);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy