logging: Logging import time on load
This commit is contained in:
		
							parent
							
								
									be5e8db579
								
							
						
					
					
						commit
						2309f75333
					
				
					 1 changed files with 17 additions and 1 deletions
				
			
		
							
								
								
									
										18
									
								
								server.py
									
										
									
									
									
								
							
							
						
						
									
										18
									
								
								server.py
									
										
									
									
									
								
							|  | @ -1,13 +1,29 @@ | ||||||
| import os |  | ||||||
| import time | import time | ||||||
|  | start_time = time.time() | ||||||
|  | 
 | ||||||
|  | import os | ||||||
|  | print(f"os imported in {time.time() - start_time:.3f}s") | ||||||
|  | 
 | ||||||
| from threading import Thread | from threading import Thread | ||||||
|  | print(f"threading imported in {time.time() - start_time:.3f}s") | ||||||
|  | 
 | ||||||
| import smtplib | import smtplib | ||||||
|  | print(f"smtplib imported in {time.time() - start_time:.3f}s") | ||||||
|  | 
 | ||||||
| from email.mime.text import MIMEText | from email.mime.text import MIMEText | ||||||
|  | print(f"email imported in {time.time() - start_time:.3f}s") | ||||||
|  | 
 | ||||||
| from flask import Flask, render_template, request, jsonify | from flask import Flask, render_template, request, jsonify | ||||||
|  | print(f"flask imported in {time.time() - start_time:.3f}s") | ||||||
|  | 
 | ||||||
| from dotenv import load_dotenv | from dotenv import load_dotenv | ||||||
|  | print(f"dotenv imported in {time.time() - start_time:.3f}s") | ||||||
|  | 
 | ||||||
| from database import init_db, get_connection, add_email, remove_email | from database import init_db, get_connection, add_email, remove_email | ||||||
|  | print(f"database imported in {time.time() - start_time:.3f}s") | ||||||
| 
 | 
 | ||||||
| load_dotenv() | load_dotenv() | ||||||
|  | print(f"load_dotenv() completed in {time.time() - start_time:.3f}s") | ||||||
| 
 | 
 | ||||||
| SMTP_SERVER   = os.getenv('SMTP_SERVER') | SMTP_SERVER   = os.getenv('SMTP_SERVER') | ||||||
| SMTP_PORT     = int(os.getenv('SMTP_PORT', 465)) | SMTP_PORT     = int(os.getenv('SMTP_PORT', 465)) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Cipher Vance
						Cipher Vance