psf / pyperf

Toolkit to run Python benchmarks
http://pyperf.readthedocs.io/
MIT License
799 stars 78 forks source link

CI: Enable macOS CI and update test_timeit.py to pass #94

Closed corona10 closed 3 years ago

corona10 commented 3 years ago

The test was failed due to different symbolic link handling for tmp_exe

Traceback (most recent call last):
  File "/Users/user/oss/pyperf/pyperf/tests/test_timeit.py", line 246, in test_python_option
    self.assertIn("python_executable: %s" % tmp_exe, cmd.stdout)
AssertionError: 'python_executable: /var/folders/mc/1ytklbws2m5gc32q6ttsqnsh0000gn/T/tmphtu26goe' not found in ".\nMetadata:\n- boot_time: 2021-03-13 01:32:00\n- cpu_count: 12\n- date: 2021-03-13 01:38:04.830475\n- duration: 20.4 ms\n- hostname: AL01727201.local\n- load_avg_1min: 1.61\n- loops: 1\n- mem_max_rss: 12252.0 MB\n- name: timeit\n- perf_version: 2.1.1\n- platform: macOS-10.16-x86_64-i386-64bit\n- python_cflags: -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g\n- python_compiler: Clang 6.0 (clang-600.0.57)\n- python_executable: /private/var/folders/mc/1ytklbws2m5gc32q6ttsqnsh0000gn/T/tmphtu26goe\n- python_implementation: cpython\n- python_version: 3.9.1 (64-bit) revision 1e5d33e9b9\n- timeit_setup: 'import time'\n- timeit_stmt: 'time.sleep(1e-6)'\n- timer: mach_absolute_time(), resolution: 1.00 ns\n- unit: second\n- uptime: 6 min 4.8 sec\n\nWARNING: the benchmark result may be unstable\n* the shortest raw value is only 16.0 us\n\nTry to rerun the benchmark with more runs, values and/or loops.\nRun 'python -m pyperf system tune' command to reduce the system jitter.\nUse pyperf stats, pyperf dump and pyperf hist to analyze results.\nUse --quiet option to hide these warnings.\n\n16.0 us\n"
corona10 commented 3 years ago

@vstinner PTAL

corona10 commented 3 years ago

@vstinner Done!