$databasePing will return your database ping.
$databasePing
This will return your database ping:
1client.command({2 name: "databasePing",3 code: `4 My database ping is: $databasePing MS!5 `6});