chore: testing execution time on the server side
Browse files- 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 |
|