From e2282716e7869ee2bd0e26ae86189ec28a4ec01c Mon Sep 17 00:00:00 2001 From: acrovato <a.crovato@uliege.be> Date: Thu, 3 Dec 2020 16:20:01 +0100 Subject: [PATCH] remove unstable test timers --- fpm/tests/timers.py | 53 --------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 fpm/tests/timers.py diff --git a/fpm/tests/timers.py b/fpm/tests/timers.py deleted file mode 100644 index 1c66613..0000000 --- a/fpm/tests/timers.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -# Copyright 2020 University of Liège -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Test the timers -# Adrien Crovato - -import fpm -import time -from fwk.testing import * -from fwk.coloring import ccolors - -def main(): - tms = fpm.Timers() - tms['1'].start() - time.sleep(0.3) - tms['1'].stop() - tms['2'].start() - tic = time.perf_counter() - dummy() - toc = time.perf_counter() - tms['2'].stop() - print(ccolors.ANSI_BLUE + 'PyTiming...' + ccolors.ANSI_RESET) - print(tms) - - print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET) - tests = CTests() - tests.add(CTest('1w', tms['1'].getWall(), 0.3, 2e-2)) - tests.add(CTest('1u', tms['1'].getCpu(), 0.0, 1e-2)) - tests.add(CTest('2w', tms['2'].getWall(), toc - tic, 2e-2)) - tests.add(CTest('2u', tms['2'].getCpu(), toc - tic, 2e-2)) - tests.run() - -def dummy(): - for i in range(0, int(1e7)): - a = 1+1 - -if __name__ == '__main__': - main() - -- GitLab