
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
This library is based around generating nice graphs for timings. It's highly modular and provides an interface to quickly and cleanly use modules.
The high-level interface is the Plotter
class which takes a timer class as its only argument. The builtin timer is MultiTimer
, where TimerNamespace
builds it without you having to.
From here you have three steps:
repeat
, as timeit
only times the functions once and skips step 2.min
, which gets the lowest value that isn't an outlier. And shows the error bars from the lowest outlier to Q3.matplotlib
via the MatPlotLib
class.import matplotlib.pyplot as plt
from graphtimer import Plotter, TimerNamespace
class ManualListCreation(TimerNamespace):
def test_comprehension(iterable):
return [i for i in iterable]
def test_append(iterable):
a = []
append = a.append
for i in iterable:
append(i)
return a
fig, axs = plt.subplots()
(
Plotter(ManualListCreation)
.repeat(100, 5, list(range(0, 10001, 1000)), args_conv=range)
.min()
.plot(axs)
)
fig.show()
To install graphtimer, just use pip:
$ pip install graphtimer
FAQs
Time code execution and graph results
We found that graphtimer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.