import os
from getpass import getpass
from netmiko import ConnectHandler
from datetime import datetime

start_time = datetime.now()

log_file = open("log.txt", "w")

device1 = {
    "host": "nxos2.lasthop.io",
    "username": "pyclass",
    "password": "88newclass",
    "device_type": "cisco_ios",
    "global_delay_factor": 2,
    "session_log": "my_session.txt"
}

net_connect = ConnectHandler(**device1)

output = net_connect.send_command("Show lldp neighbors detail")
print(output)
log_file.write(output)
net_connect.disconnect()
end_time = datetime.now() 

print(end_time - start_time)

4a9c2973069852d807bac059e3caa1731899dd9b
<mask token>

<mask token>
print(output)
log_file.write(output)
net_connect.disconnect()
<mask token>
print(end_time - start_time)

<mask token>
start_time = datetime.now()
log_file = open('log.txt', 'w')
device1 = {'host': 'nxos2.lasthop.io', 'username': 'pyclass', 'password':
    '88newclass', 'device_type': 'cisco_ios', 'global_delay_factor': 2,
    'session_log': 'my_session.txt'}
net_connect = ConnectHandler(**device1)
output = net_connect.send_command('Show lldp neighbors detail')
print(output)
log_file.write(output)
net_connect.disconnect()
end_time = datetime.now()
print(end_time - start_time)

import os
from getpass import getpass
from netmiko import ConnectHandler
from datetime import datetime
start_time = datetime.now()
log_file = open('log.txt', 'w')
device1 = {'host': 'nxos2.lasthop.io', 'username': 'pyclass', 'password':
    '88newclass', 'device_type': 'cisco_ios', 'global_delay_factor': 2,
    'session_log': 'my_session.txt'}
net_connect = ConnectHandler(**device1)
output = net_connect.send_command('Show lldp neighbors detail')
print(output)
log_file.write(output)
net_connect.disconnect()
end_time = datetime.now()
print(end_time - start_time)

import os
from getpass import getpass
from netmiko import ConnectHandler
from datetime import datetime

start_time = datetime.now()

log_file = open("log.txt", "w")

device1 = {
    "host": "nxos2.lasthop.io",
    "username": "pyclass",
    "password": "88newclass",
    "device_type": "cisco_ios",
    "global_delay_factor": 2,
    "session_log": "my_session.txt"
}

net_connect = ConnectHandler(**device1)

output = net_connect.send_command("Show lldp neighbors detail")
print(output)
log_file.write(output)
net_connect.disconnect()
end_time = datetime.now() 

print(end_time - start_time)
