Browse Source

Add a method to MPCTIO to get the current thread_lamport value

This is useful for performance debugging
Ian Goldberg 6 months ago
parent
commit
1d05a02c11
1 changed files with 5 additions and 0 deletions
  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.