MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / CommandHandler

Class CommandHandler

test/lambda/mongodb/app.py:37–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36
37class CommandHandler(CommandListener):
38 def started(self, event):
39 print("command started", event)
40
41 def succeeded(self, event):
42 global total_commands, total_command_duration
43 total_commands += 1
44 total_command_duration += event.duration_micros / 1e6
45 print("command succeeded", event)
46
47 def failed(self, event):
48 global total_commands, total_command_duration
49 total_commands += 1
50 total_command_duration += event.duration_micros / 1e6
51 print("command failed", event)
52
53
54class ServerHeartbeatHandler(ServerHeartbeatListener):

Callers 1

app.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected