aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance/print_benchmark.py
diff options
context:
space:
mode:
authorArun Isaac2023-12-29 18:55:37 +0000
committerArun Isaac2023-12-29 19:01:46 +0000
commit204a308be0f741726b9a620d88fbc22b22124c81 (patch)
treeb3cf66906674020b530c844c2bb4982c8a0e2d39 /wqflask/maintenance/print_benchmark.py
parent83062c75442160427b50420161bfcae2c5c34c84 (diff)
downloadgenenetwork2-204a308be0f741726b9a620d88fbc22b22124c81.tar.gz
Namespace all modules under gn2.
We move all modules under a gn2 directory. This is important for "correct" packaging and deployment as a Guix service.
Diffstat (limited to 'wqflask/maintenance/print_benchmark.py')
-rw-r--r--wqflask/maintenance/print_benchmark.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/wqflask/maintenance/print_benchmark.py b/wqflask/maintenance/print_benchmark.py
deleted file mode 100644
index 9d12da8a..00000000
--- a/wqflask/maintenance/print_benchmark.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/python
-
-import time
-
-from pprint import pformat as pf
-
-
-class TheCounter:
- Counters = {}
-
- def __init__(self):
- start_time = time.time()
- for counter in range(170000):
- self.print_it(counter)
- self.time_took = time.time() - start_time
- TheCounter.Counters[self.__class__.__name__] = self.time_took
-
-
-class PrintAll(TheCounter):
- def print_it(self, counter):
- print(counter)
-
-
-class PrintSome(TheCounter):
- def print_it(self, counter):
- if counter % 1000 == 0:
- print(counter)
-
-
-class PrintNone(TheCounter):
- def print_it(self, counter):
- pass
-
-
-def new_main():
- print("Running new_main")
- tests = [PrintAll, PrintSome, PrintNone]
- for test in tests:
- test()
-
- print(pf(TheCounter.Counters))
-
-
-if __name__ == '__main__':
- new_main()