This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
The following commit(s) were added to refs/heads/master by this push:
new d758f30 HDDS-4095. Byteman script to debug HCFS performance (#1311)
d758f30 is described below
commit d758f30e643708bf2062700791565401ad637c23
Author: Elek, Márton <[email protected]>
AuthorDate: Wed Aug 12 12:24:54 2020 +0200
HDDS-4095. Byteman script to debug HCFS performance (#1311)
---
dev-support/byteman/hcfs-write.btm | 111 +++++++++++++++++++++++++++++++++++++
1 file changed, 111 insertions(+)
diff --git a/dev-support/byteman/hcfs-write.btm
b/dev-support/byteman/hcfs-write.btm
new file mode 100644
index 0000000..8e8373d
--- /dev/null
+++ b/dev-support/byteman/hcfs-write.btm
@@ -0,0 +1,111 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+RULE FileSystem.close
+CLASS org.apache.hadoop.fs.FileSystem
+METHOD close
+IF TRUE
+DO
+ System.out.println("Closing file system instance: " +
System.identityHashCode($0));
+ System.out.println(" write.call: " + readCounter("write.call"));
+ System.out.println(" write.allTime: " + readCounter("write.allTime"));
+ System.out.println(" hsync.call: " + readCounter("hsync.call"));
+ System.out.println(" hsync.allTime: " + readCounter("hsync.allTime"));
+ System.out.println(" hflush.call: " + readCounter("hflush.call"));
+ System.out.println(" hflush.allTime: " + readCounter("hflush.allTime"));
+ System.out.println(" close.call: " + readCounter("close.call"));
+ System.out.println(" close.allTime: " + readCounter("close.allTime"))
+
+
+ENDRULE
+
+RULE DataOutputStream.Write.Entry
+CLASS ^FSDataOutputStream$PositionCache
+METHOD write
+AT ENTRY
+IF TRUE
+DO resetTimer(Thread.currentThread());
+ incrementCounter("write.call")
+ENDRULE
+
+RULE DataOutputStream.Write.Exit
+CLASS ^FSDataOutputStream$PositionCache
+METHOD write
+AT EXIT
+BIND elapsedTime =
java.lang.Math.toIntExact(getElapsedTimeFromTimer(Thread.currentThread()))
+IF TRUE
+DO
+ incrementCounter("write.allTime", elapsedTime)
+ENDRULE
+
+
+RULE FSDataOutputStream.Hsync.Entry
+CLASS FSDataOutputStream
+METHOD hsync
+AT ENTRY
+IF TRUE
+DO resetTimer(Thread.currentThread());
+ incrementCounter("hsync.call")
+ENDRULE
+
+RULE FSDataOutputStream.Hsync.Exit
+CLASS FSDataOutputStream
+METHOD hsync
+AT EXIT
+BIND elapsedTime =
java.lang.Math.toIntExact(getElapsedTimeFromTimer(Thread.currentThread()))
+IF TRUE
+DO
+ incrementCounter("hsync.allTime", elapsedTime)
+ENDRULE
+
+
+RULE FSDataOutputStream.Hflush.Entry
+CLASS ^FSDataOutputStream
+METHOD hflush
+AT ENTRY
+IF TRUE
+DO resetTimer(Thread.currentThread());
+ incrementCounter("hflush.call")
+ENDRULE
+
+RULE FSDataOutputStream.Hflush.Exit
+CLASS ^FSDataOutputStream
+METHOD hflush
+AT EXIT
+BIND elapsedTime =
java.lang.Math.toIntExact(getElapsedTimeFromTimer(Thread.currentThread()))
+IF TRUE
+DO
+ incrementCounter("hflush.allTime", elapsedTime)
+ENDRULE
+
+
+RULE FSDataOutputStream.Close.Entry
+CLASS ^FSDataOutputStream
+METHOD close
+AT ENTRY
+IF TRUE
+DO resetTimer(Thread.currentThread());
+ incrementCounter("close.call")
+ENDRULE
+
+RULE FSDataOutputStream.Close.Exit
+CLASS ^FSDataOutputStream
+METHOD close
+AT EXIT
+BIND elapsedTime =
java.lang.Math.toIntExact(getElapsedTimeFromTimer(Thread.currentThread()))
+IF TRUE
+DO
+ incrementCounter("close.allTime", elapsedTime)
+ENDRULE
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]