A Mouritech package
Project description
Package Name
MT_PY_PerformanceLogging
''' Performance in python. This is the project ,Whenever you need to check the performance of the code like time taken by the code to perform some task we will use this package in our module''' a
Requirements
'''For running this, you need to have python3 installed on your system'''
Debugging tools
'''supported tools pycharm ,Anakonda ,Visual Studio etc...
Installation
Install my-project with Python Install MT_PY_PerformanceLogging
pip install MT_PY_PerformanceLogging cd MT_PY_PerformanceLogging
(globally )
pip install -i https://test.pypi.org/simple/ MT_PY_PerformanceLogging
Steps
pip install -i https://test.pypi.org/simple/ MT_PY_PerformanceLogging
pip install Mouritech_LoggingPerformance
from MT_PY_Performancelogging.MT_Performance import MT_PerformanceLogger from MT_Performance import MT_PerformanceLogger
MT_PerformanceLogger(
)
Receiver Example
import time module
import time
'''Importing our custom package from module Logperformance''' from MT_PY_Performancelogging.MT_Performance import MT_PerformanceLogger
Create an instance of PerformanceLogger with a log file
logger = MT_PerformanceLogger(name, log_file='performance.log')
Use the logger to measure function performance
@logger.log_performance def Disarum(): '''Code which checks the Provided Number is Disarum number or Not''' num=int(input('Enter Num value:')) result=0 power=1 for x in str(num): y=int(x)
'''Logic to check the disarum Number '''
result= result + y**power
power=power+1
'''If the provided number is same as resultant number then it will be disarum number '''
if num==result:
print(f'The provide {num} is Disarum')
else:
print(f'The Provided {num} is Not a Disarum Number')
'''Time taken by the funtion to excute the output '''
time.sleep(1)
Call the function
Disarum()
Output :
'''The Provided Number is Disarum Number or Not Disarum number '''
2023-06-01 11:48:05,439 - main - INFO - Function 'Disarum' executed in = started at 1685600283.4058442 ended at 1685600285.4397306 = 2.0339 seconds
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for MT_PY_PerformanceLogging-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05fa3abb813a0ee4e646897a662b0d2c57ef72183a25433818d68465981a3dca |
|
MD5 | ef3a64a350f17a6491ec68fc0d2635e7 |
|
BLAKE2b-256 | 1153908b779dd336b8dbe6190c5851646e08d6d638d7668c33eac8f7815a2c6a |
Hashes for MT_PY_PerformanceLogging-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8faed5297b83f32a157cefae500ac5b7272c8eeac367b58f932e5dd05b907c9c |
|
MD5 | 5f6abcff58d2ca2e988881c047028787 |
|
BLAKE2b-256 | f39e2d1882f424d26ce68e6a8e83e690faaa8159f6d3c6fbcc63b99771ce7b05 |