From d14467787c9c4caebc27e749ed58e9e5dd6dbe50 Mon Sep 17 00:00:00 2001 From: Robert Izzard <r.izzard@surrey.ac.uk> Date: Sat, 20 Nov 2021 14:56:06 +0000 Subject: [PATCH] fix comment --- binarycpython/utils/cache.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/binarycpython/utils/cache.py b/binarycpython/utils/cache.py index 001abc028..958cfbc04 100644 --- a/binarycpython/utils/cache.py +++ b/binarycpython/utils/cache.py @@ -147,7 +147,13 @@ class cache(): if usecachetype != "NoCache": self.caches[func] = cachetools_func(*args) - def test_caches(self,ntests=10000,dt=5.0): + def test_caches(self,dt=5.0): + """ + Function to test cache speeds of the functions that binary_c-python automatically caches. + + Args: + dt (default 5) in seconds the length of each test. Long is more accurate, but takes longer (obviously). + """ cachetypes = ("NullCache","FIFOCache","LRUCache","TTLCache","NoCache") functions = self.grid_options['function_cache_functions'].keys() maxsizes = (0,1,2,4,8,16,32,64,128,256) @@ -211,6 +217,7 @@ class cache(): stdscr.refresh() stdscr.getkey() + stdscr.keypad(0) curses.echo() print("\npress any key to exit\n") curses.endwin() -- GitLab