Prechádzať zdrojové kódy

Add a method to MPCTIO to get the current thread_lamport value

This is useful for performance debugging
Ian Goldberg 1 rok pred
rodič
commit
1d05a02c11
1 zmenil súbory, kde vykonal 5 pridanie a 0 odobranie
  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.