asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject asterixdb git commit: [NO ISSUE][OTH] Add component size to traces of IO operations
Date Sun, 22 Oct 2017 19:01:24 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 7e76a0797 -> c06c7f43a


[NO ISSUE][OTH] Add component size to traces of IO operations

- user model changes: no
- storage format changes: no
- interface changes: yes
  The ITracer interface now support adding name and cat to
  Duration end events.
  ITracer.durationE(String name, String cat, long tid, String args)

Details:
- The duration end trace now adds size information of the resulted
  component.

Change-Id: Icd8ba8194a00019179c3547fac060fc68edb97f0
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2088
Reviewed-by: Till Westmann <tillw@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/c06c7f43
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/c06c7f43
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/c06c7f43

Branch: refs/heads/master
Commit: c06c7f43a117db60dd87885624492e2461aa69b2
Parents: 7e76a07
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Sun Oct 22 09:48:56 2017 -0700
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Sun Oct 22 12:00:53 2017 -0700

----------------------------------------------------------------------
 .../storage/am/lsm/common/impls/TracedIOOperation.java        | 3 ++-
 .../src/main/java/org/apache/hyracks/util/trace/ITracer.java  | 7 +++++++
 .../src/main/java/org/apache/hyracks/util/trace/Tracer.java   | 6 ++++++
 3 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c06c7f43/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
index 9cc8022..a7ec8c3 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
@@ -87,7 +87,8 @@ class TracedIOOperation implements ILSMIOOperation {
         try {
             return ioOp.call();
         } finally {
-            tracer.durationE(tid, "{\"optional\":\"value\"}");
+            tracer.durationE(getTarget().getRelativePath(), cat, tid,
+                    "{\"size\":" + getTarget().getFile().length() + "}");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c06c7f43/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/ITracer.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/ITracer.java
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/ITracer.java
index 01b78da..8342c5b 100644
--- a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/ITracer.java
+++ b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/ITracer.java
@@ -76,6 +76,11 @@ public interface ITracer {
         public void instant(String name, String cat, Scope scope, String args) {
             // nothing to do here
         }
+
+        @Override
+        public void durationE(String name, String cat, long tid, String args) {
+            // nothing to do here
+        }
     };
 
     static ITracer check(ITracer tracer) {
@@ -93,6 +98,8 @@ public interface ITracer {
 
     void durationE(long tid, String args);
 
+    void durationE(String name, String cat, long tid, String args);
+
     void instant(String name, String cat, Scope scope, String args);
 
     @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c06c7f43/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
index 00991e4..d540dda 100644
--- a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
+++ b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
@@ -89,6 +89,12 @@ public class Tracer implements ITracer {
     }
 
     @Override
+    public void durationE(String name, String cat, long tid, String args) {
+        Event e = Event.create(name, cat, Phase.E, pid, tid, null, args);
+        traceLog.log(TRACE_LOG_LEVEL, e.toJson());
+    }
+
+    @Override
     public void instant(String name, String cat, Scope scope, String args) {
         Event e = Event.create(name, cat, Phase.i, pid, Thread.currentThread().getId(), scope,
args);
         traceLog.log(TRACE_LOG_LEVEL, e.toJson());


Mime
View raw message