From 17c2a05ed9ac30cdf40ab323274c545823468e0f Mon Sep 17 00:00:00 2001 From: Sayed Bilal Bari Date: Mon, 15 Jul 2024 10:03:31 -0500 Subject: [PATCH] Adding license header + README changes Signed-off-by: Sayed Bilal Bari --- .../spark/rapids/tool/benchmarks/README.md | 3 ++- .../rapids/tool/util/MemoryMetricsTracker.scala | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/README.md b/core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/README.md index 1b6657740..8046b6321 100644 --- a/core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/README.md +++ b/core/src/main/scala/org/apache/spark/rapids/tool/benchmarks/README.md @@ -19,11 +19,12 @@ Use the java command to run the created benchmark class with the following suppo #### Running the Benchmark class directly ```shell -java -cp $CLASSPATH:$SPARK_HOME/jars/* \ +java -cp $CLASSPATH:$SPARK_HOME/jars/*:$MAVEN-ARTIFACT-JAR \ org.apache.spark.rapids.tool.benchmarks.SingleThreadedQualToolBenchmark \ -i 3 -w 3 -a " $EVENT_LOGS_DIR" ``` * `$CLASSPATH` : Path to the compiled class directory. Ex - `/core/target/*` +* `$MAVEN-ARTIFACT-JAR` : Path to maven-artifact jar. Download jar from [here](https://mvnrepository.com/artifact/org.apache.maven/maven-artifact/3.9.0) * `$EVENT_LOGS_DIR` : Path to the event logs directory #### Running the Benchmark class using tools jar diff --git a/core/src/main/scala/org/apache/spark/sql/rapids/tool/util/MemoryMetricsTracker.scala b/core/src/main/scala/org/apache/spark/sql/rapids/tool/util/MemoryMetricsTracker.scala index c796e413c..de2a9a98d 100644 --- a/core/src/main/scala/org/apache/spark/sql/rapids/tool/util/MemoryMetricsTracker.scala +++ b/core/src/main/scala/org/apache/spark/sql/rapids/tool/util/MemoryMetricsTracker.scala @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2024, NVIDIA CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.spark.sql.rapids.tool.util import java.lang.management.ManagementFactory