A tartiflette plugin that will print execution duration of a field
Project description
tartiflette-plugin-time-it
Allows you to view field time execution in your log as easily as :
type Example {
aField: String @timeIt
}
By default the timeIt
directive will use it's own logger retrieved by logging.getLogger("__name__")
.
If called with useLogger: false
it will use the print statement.
At init time, using the create_engine
api, you can pass your own logger to the directive.
engine = await create_engine(sdl, modules=[{"name": "tartiflette_plugin_time_it", "config": {"logger": myLogger()}}])
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
File details
Details for the file tartiflette-plugin-time-it-1.0.0.tar.gz
.
File metadata
- Download URL: tartiflette-plugin-time-it-1.0.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4df99a9b4e2e50ff8a74c6349c2b8d3a7f2814bfa5bc52365fafe2d49d56c80 |
|
MD5 | bde88164ee5f379f6a27d2a144c9635e |
|
BLAKE2b-256 | affaaea6e891abe0144b590e31507727d3c6cb8cb8e8bd9623da042898f258c2 |