Преглед изворни кода

Add a method to MPCTIO to get the current thread_lamport value

This is useful for performance debugging
Ian Goldberg пре 1 година
родитељ
комит
1d05a02c11
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      mpcio.hpp

+ 5 - 0
mpcio.hpp

@@ -381,6 +381,11 @@ public:
     // run.
     void reset_lamport();
 
+    // Read the thread_lamport counter, for performance debugging
+    lamport_t get_thread_lamport() {
+        return thread_lamport;
+    }
+
     // The normal case, where the MPCIO is created inside the thread,
     // and so destructed when the thread ends, is handled automatically
     // here.