Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public class Metrics implements IMetrics {
public long[] remainingFilterTime;
public long[] ioWaitTime;
public long[] storageReadBytes;
public long[] storageReads;
public long[] localReadBytes;
public long[] ramReadBytes;
public long[] preloadSplits;
Expand Down Expand Up @@ -103,6 +104,7 @@ public Metrics(
long[] remainingFilterTime,
long[] ioWaitTime,
long[] storageReadBytes,
long[] storageReads,
long[] localReadBytes,
long[] ramReadBytes,
long[] preloadSplits,
Expand Down Expand Up @@ -147,6 +149,7 @@ public Metrics(
this.remainingFilterTime = remainingFilterTime;
this.ioWaitTime = ioWaitTime;
this.storageReadBytes = storageReadBytes;
this.storageReads = storageReads;
this.localReadBytes = localReadBytes;
this.ramReadBytes = ramReadBytes;
this.preloadSplits = preloadSplits;
Expand Down Expand Up @@ -199,6 +202,7 @@ public OperatorMetrics getOperatorMetrics(int index) {
remainingFilterTime[index],
ioWaitTime[index],
storageReadBytes[index],
storageReads[index],
localReadBytes[index],
ramReadBytes[index],
preloadSplits[index],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public class OperatorMetrics implements IOperatorMetrics {
public long remainingFilterTime;
public long ioWaitTime;
public long storageReadBytes;
public long storageReads;
public long localReadBytes;
public long ramReadBytes;
public long preloadSplits;
Expand Down Expand Up @@ -96,6 +97,7 @@ public OperatorMetrics(
long remainingFilterTime,
long ioWaitTime,
long storageReadBytes,
long storageReads,
long localReadBytes,
long ramReadBytes,
long preloadSplits,
Expand Down Expand Up @@ -138,6 +140,7 @@ public OperatorMetrics(
this.remainingFilterTime = remainingFilterTime;
this.ioWaitTime = ioWaitTime;
this.storageReadBytes = storageReadBytes;
this.storageReads = storageReads;
this.localReadBytes = localReadBytes;
this.ramReadBytes = ramReadBytes;
this.preloadSplits = preloadSplits;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class VeloxMetricsApi extends MetricsApi with Logging {
"remaining filter time"),
"ioWaitTime" -> SQLMetrics.createNanoTimingMetric(sparkContext, "io wait time"),
"storageReadBytes" -> SQLMetrics.createSizeMetric(sparkContext, "storage read bytes"),
"storageReads" -> SQLMetrics.createMetric(sparkContext, "number of storage reads"),
"localReadBytes" -> SQLMetrics.createSizeMetric(sparkContext, "local ssd read bytes"),
"ramReadBytes" -> SQLMetrics.createSizeMetric(sparkContext, "ram read bytes"),
"loadLazyVectorTime" -> SQLMetrics.createNanoTimingMetric(
Expand Down Expand Up @@ -186,6 +187,7 @@ class VeloxMetricsApi extends MetricsApi with Logging {
"remaining filter time"),
"ioWaitTime" -> SQLMetrics.createNanoTimingMetric(sparkContext, "io wait time"),
"storageReadBytes" -> SQLMetrics.createSizeMetric(sparkContext, "storage read bytes"),
"storageReads" -> SQLMetrics.createMetric(sparkContext, "number of storage reads"),
"localReadBytes" -> SQLMetrics.createSizeMetric(sparkContext, "local ssd read bytes"),
"ramReadBytes" -> SQLMetrics.createSizeMetric(sparkContext, "ram read bytes"),
"loadLazyVectorTime" -> SQLMetrics.createNanoTimingMetric(
Expand Down Expand Up @@ -237,6 +239,7 @@ class VeloxMetricsApi extends MetricsApi with Logging {
"remaining filter time"),
"ioWaitTime" -> SQLMetrics.createNanoTimingMetric(sparkContext, "io wait time"),
"storageReadBytes" -> SQLMetrics.createSizeMetric(sparkContext, "storage read bytes"),
"storageReads" -> SQLMetrics.createMetric(sparkContext, "number of storage reads"),
"localReadBytes" -> SQLMetrics.createSizeMetric(sparkContext, "local ssd read bytes"),
"ramReadBytes" -> SQLMetrics.createSizeMetric(sparkContext, "ram read bytes"),
"loadLazyVectorTime" -> SQLMetrics.createNanoTimingMetric(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class BatchScanMetricsUpdater(val metrics: Map[String, SQLMetric]) extends Metri
metrics("remainingFilterTime") += operatorMetrics.remainingFilterTime
metrics("ioWaitTime") += operatorMetrics.ioWaitTime
metrics("storageReadBytes") += operatorMetrics.storageReadBytes
metrics("storageReads") += operatorMetrics.storageReads
metrics("localReadBytes") += operatorMetrics.localReadBytes
metrics("ramReadBytes") += operatorMetrics.ramReadBytes
metrics("preloadSplits") += operatorMetrics.preloadSplits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class FileSourceScanMetricsUpdater(@transient val metrics: Map[String, SQLMetric
val remainingFilterTime: SQLMetric = metrics("remainingFilterTime")
val ioWaitTime: SQLMetric = metrics("ioWaitTime")
val storageReadBytes: SQLMetric = metrics("storageReadBytes")
val storageReads: SQLMetric = metrics("storageReads")
val localReadBytes: SQLMetric = metrics("localReadBytes")
val ramReadBytes: SQLMetric = metrics("ramReadBytes")
val loadLazyVectorTime: SQLMetric = metrics("loadLazyVectorTime")
Expand Down Expand Up @@ -81,6 +82,7 @@ class FileSourceScanMetricsUpdater(@transient val metrics: Map[String, SQLMetric
remainingFilterTime += operatorMetrics.remainingFilterTime
ioWaitTime += operatorMetrics.ioWaitTime
storageReadBytes += operatorMetrics.storageReadBytes
storageReads += operatorMetrics.storageReads
localReadBytes += operatorMetrics.localReadBytes
ramReadBytes += operatorMetrics.ramReadBytes
preloadSplits += operatorMetrics.preloadSplits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class HiveTableScanMetricsUpdater(@transient val metrics: Map[String, SQLMetric]
val remainingFilterTime: SQLMetric = metrics("remainingFilterTime")
val ioWaitTime: SQLMetric = metrics("ioWaitTime")
val storageReadBytes: SQLMetric = metrics("storageReadBytes")
val storageReads: SQLMetric = metrics("storageReads")
val localReadBytes: SQLMetric = metrics("localReadBytes")
val ramReadBytes: SQLMetric = metrics("ramReadBytes")
val loadLazyVectorTime: SQLMetric = metrics("loadLazyVectorTime")
Expand Down Expand Up @@ -76,6 +77,7 @@ class HiveTableScanMetricsUpdater(@transient val metrics: Map[String, SQLMetric]
remainingFilterTime += operatorMetrics.remainingFilterTime
ioWaitTime += operatorMetrics.ioWaitTime
storageReadBytes += operatorMetrics.storageReadBytes
storageReads += operatorMetrics.storageReads
localReadBytes += operatorMetrics.localReadBytes
ramReadBytes += operatorMetrics.ramReadBytes
preloadSplits += operatorMetrics.preloadSplits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ object MetricsUtil extends Logging {
var remainingFilterTime: Long = 0
var ioWaitTime: Long = 0
var storageReadBytes: Long = 0
var storageReads: Long = 0
var localReadBytes: Long = 0
var ramReadBytes: Long = 0
var preloadSplits: Long = 0
Expand Down Expand Up @@ -168,6 +169,7 @@ object MetricsUtil extends Logging {
remainingFilterTime += metrics.remainingFilterTime
ioWaitTime += metrics.ioWaitTime
storageReadBytes += metrics.storageReadBytes
storageReads += metrics.storageReads
localReadBytes += metrics.localReadBytes
ramReadBytes += metrics.ramReadBytes
preloadSplits += metrics.preloadSplits
Expand Down Expand Up @@ -211,6 +213,7 @@ object MetricsUtil extends Logging {
remainingFilterTime,
ioWaitTime,
storageReadBytes,
storageReads,
localReadBytes,
ramReadBytes,
preloadSplits,
Expand Down
3 changes: 2 additions & 1 deletion cpp/core/jni/JniWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
env,
metricsBuilderClass,
"<init>",
"([J[J[J[J[J[J[J[J[J[JJ[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[JLjava/lang/String;)V");
"([J[J[J[J[J[J[J[J[J[JJ[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[J[JLjava/lang/String;)V");

nativeColumnarToRowInfoClass =
createGlobalClassReferenceOrError(env, "Lorg/apache/gluten/vectorized/NativeColumnarToRowInfo;");
Expand Down Expand Up @@ -601,6 +601,7 @@ JNIEXPORT jobject JNICALL Java_org_apache_gluten_metrics_IteratorMetricsJniWrapp
longArray[Metrics::kRemainingFilterTime],
longArray[Metrics::kIoWaitTime],
longArray[Metrics::kStorageReadBytes],
longArray[Metrics::kStorageReads],
longArray[Metrics::kLocalReadBytes],
longArray[Metrics::kRamReadBytes],
longArray[Metrics::kPreloadSplits],
Expand Down
1 change: 1 addition & 0 deletions cpp/core/utils/Metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ struct Metrics {
kRemainingFilterTime,
kIoWaitTime,
kStorageReadBytes,
kStorageReads,
kLocalReadBytes,
kRamReadBytes,
kPreloadSplits,
Expand Down
2 changes: 2 additions & 0 deletions cpp/velox/compute/WholeStageResultIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ void WholeStageResultIterator::collectMetrics() {
metrics_->get(Metrics::kIoWaitTime)[metricIndex] = runtimeMetric("sum", second->customStats, kIoWaitTime);
metrics_->get(Metrics::kStorageReadBytes)[metricIndex] =
runtimeMetric("sum", second->customStats, kStorageReadBytes);
metrics_->get(Metrics::kStorageReads)[metricIndex] =
runtimeMetric("count", second->customStats, kStorageReadBytes);
metrics_->get(Metrics::kLocalReadBytes)[metricIndex] = runtimeMetric("sum", second->customStats, kLocalReadBytes);
metrics_->get(Metrics::kRamReadBytes)[metricIndex] = runtimeMetric("sum", second->customStats, kRamReadBytes);
metrics_->get(Metrics::kPreloadSplits)[metricIndex] =
Expand Down
Loading