Package org.apache.wayang.profiler.java
Class OperatorProfiler
- java.lang.Object
-
- org.apache.wayang.profiler.java.OperatorProfiler
-
- Direct Known Subclasses:
BinaryOperatorProfiler,SinkProfiler,SourceProfiler,UnaryOperatorProfiler
public abstract class OperatorProfiler extends java.lang.ObjectAllows to instrument anJavaExecutionOperator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOperatorProfiler.ResultThe result of a single profiling run.
-
Field Summary
Fields Modifier and Type Field Description intcpuMhzprotected java.util.List<java.util.function.Supplier<?>>dataQuantumGeneratorsprotected JavaExecutorexecutorprotected org.apache.logging.log4j.Loggerloggerprotected JavaExecutionOperatoroperatorprotected java.util.function.Supplier<JavaExecutionOperator>operatorGenerator
-
Constructor Summary
Constructors Constructor Description OperatorProfiler(java.util.function.Supplier<JavaExecutionOperator> operatorGenerator, java.util.function.Supplier<?>... dataQuantumGenerators)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static CollectionChannel.InstancecreateChannelInstance()protected static CollectionChannel.InstancecreateChannelInstance(java.util.Collection<?> collection)protected voidevaluate(ChannelInstance[] inputs, ChannelInstance[] outputs)protected abstract longexecuteOperator()Executes the profiling task.JavaExecutionOperatorgetOperator()voidprepare(long... inputCardinalities)protected longprovideDiskBytes()protected longprovideNetworkBytes()OperatorProfiler.Resultrun()Executes and profiles the profiling task.
-
-
-
Field Detail
-
logger
protected final org.apache.logging.log4j.Logger logger
-
cpuMhz
public int cpuMhz
-
operatorGenerator
protected java.util.function.Supplier<JavaExecutionOperator> operatorGenerator
-
operator
protected JavaExecutionOperator operator
-
executor
protected JavaExecutor executor
-
dataQuantumGenerators
protected final java.util.List<java.util.function.Supplier<?>> dataQuantumGenerators
-
-
Constructor Detail
-
OperatorProfiler
public OperatorProfiler(java.util.function.Supplier<JavaExecutionOperator> operatorGenerator, java.util.function.Supplier<?>... dataQuantumGenerators)
-
-
Method Detail
-
prepare
public void prepare(long... inputCardinalities)
-
run
public OperatorProfiler.Result run()
Executes and profiles the profiling task. Requires that this instance is prepared.
-
provideNetworkBytes
protected long provideNetworkBytes()
-
provideDiskBytes
protected long provideDiskBytes()
-
executeOperator
protected abstract long executeOperator()
Executes the profiling task. Requires that this instance is prepared.
-
createChannelInstance
protected static CollectionChannel.Instance createChannelInstance(java.util.Collection<?> collection)
-
createChannelInstance
protected static CollectionChannel.Instance createChannelInstance()
-
getOperator
public JavaExecutionOperator getOperator()
-
evaluate
protected void evaluate(ChannelInstance[] inputs, ChannelInstance[] outputs)
-
-