()
| 106 | |
| 107 | @pytest.mark.skipif("not psutil") |
| 108 | def test_resource_profiler_multiple_gets(): |
| 109 | with ResourceProfiler(dt=0.01) as rprof: |
| 110 | get(dsk2, "c") |
| 111 | assert len(rprof.results) == 0 |
| 112 | get(dsk2, "c") |
| 113 | results = rprof.results |
| 114 | assert all(isinstance(i, tuple) and len(i) == 3 for i in results) |
| 115 | |
| 116 | rprof.clear() |
| 117 | rprof.register() |
| 118 | get(dsk2, "c") |
| 119 | assert len(rprof.results) > 0 |
| 120 | get(dsk2, "c") |
| 121 | rprof.unregister() |
| 122 | |
| 123 | results = rprof.results |
| 124 | assert all(isinstance(i, tuple) and len(i) == 3 for i in results) |
| 125 | |
| 126 | rprof.close() |
| 127 | assert not rprof._is_running() |
| 128 | |
| 129 | |
| 130 | def test_cache_profiler(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…