[issue31596] expose pthread_getcpuclockid in time module

2017-10-06 Thread STINNER Victor

STINNER Victor  added the comment:

Thank you Benjamin, buildots are back to green :-)

I prefer the new unit test which only tests pthread_getcpuclockid() clock and 
not make any assumption on the link between this clock and 
CLOCK_THREAD_CPUTIME_ID.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31596] expose pthread_getcpuclockid in time module

2017-10-05 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 86566702f311f8e90600e85350f6b6769a384ea5 by Benjamin Peterson in 
branch 'master':
weaken pthread_getcpuclockid test (more bpo-31596) (#3904)
https://github.com/python/cpython/commit/86566702f311f8e90600e85350f6b6769a384ea5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31596] expose pthread_getcpuclockid in time module

2017-10-05 Thread Benjamin Peterson

Change by Benjamin Peterson :


--
pull_requests: +3875

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31596] expose pthread_getcpuclockid in time module

2017-10-05 Thread pdox

pdox  added the comment:

This looks specific to FreeBSD and s390x. Those platforms might not provide the 
same cpu-time clock consistency guarantees as Linux+glibc+x86. Would it be ok 
to just disable the ordering check for those systems?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31596] expose pthread_getcpuclockid in time module

2017-10-05 Thread STINNER Victor

STINNER Victor  added the comment:

The test is too strict, it fails on many buildbots.

Four examples:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/1008/steps/test/logs/stdio

==
FAIL: test_pthread_getcpuclockid (test.test_time.TimeTestCase)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_time.py", 
line 100, in test_pthread_getcpuclockid
self.assertLessEqual(t2, t3)
AssertionError: 16.309616 not less than or equal to 16.309358

http://buildbot.python.org/all/builders/s390x%20Debian%203.x/builds/1466/steps/test/logs/stdio

==
FAIL: test_pthread_getcpuclockid (test.test_time.TimeTestCase)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_time.py",
 line 99, in test_pthread_getcpuclockid
self.assertLessEqual(t1, t2)
AssertionError: 0.938456056 not less than or equal to 0.832485960001

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/999/steps/test/logs/stdio

==
FAIL: test_pthread_getcpuclockid (test.test_time.TimeTestCase)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/test_time.py",
 line 100, in test_pthread_getcpuclockid
self.assertLessEqual(t2, t3)
AssertionError: 0.813547 not less than or equal to 0.81335

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/996/steps/test/logs/stdio

==
FAIL: test_pthread_getcpuclockid (test.test_time.TimeTestCase)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_time.py",
 line 100, in test_pthread_getcpuclockid
self.assertLessEqual(t2, t3)
AssertionError: 1.121773 not less than or equal to 1.121547

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31596] expose pthread_getcpuclockid in time module

2017-10-05 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset e14679c78464d1e0e16786c2a0e9bcebe49e842b by Benjamin Peterson 
(pdox) in branch 'master':
closes bpo-31596: Add an interface for pthread_getcpuclockid(3) (#3756)
https://github.com/python/cpython/commit/e14679c78464d1e0e16786c2a0e9bcebe49e842b


--
nosy: +benjamin.peterson
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31596] expose pthread_getcpuclockid in time module

2017-09-26 Thread pdox

New submission from pdox:

time.clock_gettime() makes it possible to retrieve the thread-specific cpu-time 
clock for the current thread using time.CLOCK_THREAD_CPUTIME_ID. However, it is 
currently not possible in Python to retrieve the thread-specific clock for 
other threads. Exposing pthread_getcpuclockid() makes this possible.

--
components: Extension Modules
messages: 303059
nosy: pdox
priority: normal
pull_requests: 3756
severity: normal
status: open
title: expose pthread_getcpuclockid in time module
type: enhancement
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com