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.Object
Allows to instrument anJavaExecutionOperator
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OperatorProfiler.Result
The result of a single profiling run.
-
Field Summary
Fields Modifier and Type Field Description int
cpuMhz
protected java.util.List<java.util.function.Supplier<?>>
dataQuantumGenerators
protected JavaExecutor
executor
protected org.apache.logging.log4j.Logger
logger
protected JavaExecutionOperator
operator
protected 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.Instance
createChannelInstance()
protected static CollectionChannel.Instance
createChannelInstance(java.util.Collection<?> collection)
protected void
evaluate(ChannelInstance[] inputs, ChannelInstance[] outputs)
protected abstract long
executeOperator()
Executes the profiling task.JavaExecutionOperator
getOperator()
void
prepare(long... inputCardinalities)
protected long
provideDiskBytes()
protected long
provideNetworkBytes()
OperatorProfiler.Result
run()
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)
-
-