Skip to main content

Import Time

Use this module to debug your import times or to check how long a process takes.

Usage

Debug Import Times

This will print out the time it takes to import each module, but will not import them globally to your application. Please just use this function to debug times.

from importTime import debugImportTimes

debugImportTimes(["numpy", "torch", "mediapipe", "PIL"], "MainDeps")

Prints:

Time to Import  MainDeps: 0.08100032806396484

Reveal Times

Can be added to your currently running application. This will print out the time it takes to import between startImport() and endImport("moduleName").

```python

from importTime import startImport , endImport, startTotal, endTotal, saveCSV


startTotal()

startImport()
import numpy as np
endImport("numpy")
startImport()
import torch
endImport("torch")

startImport()
from PIL import Image, ImageFilter
import PIL
import mediapipe as mp
endImport("MediaPipe + PIL")


endTotal()

# Optional
saveCSV("importTime.csv")

Prints

Time to Import numpy: 0.08100032806396484
Time to Import torch: 0.9580004215240479
Time to Import MediaPipe + PIL: 2.0379998683929443
Total to Import Time: 3.077000141143799

Metadata

Release files for importTime 1.0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for importTime 1.0.3.2
File Interpreter ABI Platform
importTime-1.0.3.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / importTime-1.0.3.2-py2.py3-none-any.whl

Download URL importTime-1.0.3.2-py2.py3-none-any.whl
Size 6.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8c0518e8a09d735a88019839e181246309b99a88ca0d654c40ca7634adc9d0cd
BLAKE2b-256 checksum
How to use checksums
e364b0758dcb2d6a7139e89ad7fa4026b4000ee5bf12d803d8cf3bbddb4543cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release history Release notifications | RSS feed

This release

1.0.3.2 This release

1 release file

1.0.2.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page