binoua commited on
Commit
f7b8932
·
1 Parent(s): 51b9cef

chore: testing execution time on the server side

Browse files
Files changed (1) hide show
  1. handler.py +4 -0
handler.py CHANGED
@@ -73,7 +73,11 @@ class EndpointHandler:
73
  evaluation_keys = self.key_database[uid]
74
 
75
  # Run CML prediction
 
76
  encrypted_prediction = self.fhemodel_server.run(encrypted_inputs, evaluation_keys)
 
 
 
77
 
78
  return to_json(encrypted_prediction)
79
 
 
73
  evaluation_keys = self.key_database[uid]
74
 
75
  # Run CML prediction
76
+ duration = -time.time()
77
  encrypted_prediction = self.fhemodel_server.run(encrypted_inputs, evaluation_keys)
78
+ duration += time.time()
79
+
80
+ print(f"Duration {duration=} seconds")
81
 
82
  return to_json(encrypted_prediction)
83