{"action":"closed","issue":{"url":"https://api.github.com/repos/OpenLiberty/open-liberty/issues/1907","repository_url":"https://api.github.com/repos/OpenLiberty/open-liberty","labels_url":"https://api.github.com/repos/OpenLiberty/open-liberty/issues/1907/labels{/name}","comments_url":"https://api.github.com/repos/OpenLiberty/open-liberty/issues/1907/comments","events_url":"https://api.github.com/repos/OpenLiberty/open-liberty/issues/1907/events","html_url":"https://github.com/OpenLiberty/open-liberty/issues/1907","id":293191178,"number":1907,"title":"Update usages of Runtime.getRuntime().availableProcessors() to use central utility","user":{"login":"ewhoch","id":22820903,"avatar_url":"https://avatars3.githubusercontent.com/u/22820903?v=4","gravatar_id":"","url":"https://api.github.com/users/ewhoch","html_url":"https://github.com/ewhoch","followers_url":"https://api.github.com/users/ewhoch/followers","following_url":"https://api.github.com/users/ewhoch/following{/other_user}","gists_url":"https://api.github.com/users/ewhoch/gists{/gist_id}","starred_url":"https://api.github.com/users/ewhoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewhoch/subscriptions","organizations_url":"https://api.github.com/users/ewhoch/orgs","repos_url":"https://api.github.com/users/ewhoch/repos","events_url":"https://api.github.com/users/ewhoch/events{/privacy}","received_events_url":"https://api.github.com/users/ewhoch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"hlhoots","id":28309249,"avatar_url":"https://avatars0.githubusercontent.com/u/28309249?v=4","gravatar_id":"","url":"https://api.github.com/users/hlhoots","html_url":"https://github.com/hlhoots","followers_url":"https://api.github.com/users/hlhoots/followers","following_url":"https://api.github.com/users/hlhoots/following{/other_user}","gists_url":"https://api.github.com/users/hlhoots/gists{/gist_id}","starred_url":"https://api.github.com/users/hlhoots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlhoots/subscriptions","organizations_url":"https://api.github.com/users/hlhoots/orgs","repos_url":"https://api.github.com/users/hlhoots/repos","events_url":"https://api.github.com/users/hlhoots/events{/privacy}","received_events_url":"https://api.github.com/users/hlhoots/received_events","type":"User","site_admin":false},"assignees":[{"login":"hlhoots","id":28309249,"avatar_url":"https://avatars0.githubusercontent.com/u/28309249?v=4","gravatar_id":"","url":"https://api.github.com/users/hlhoots","html_url":"https://github.com/hlhoots","followers_url":"https://api.github.com/users/hlhoots/followers","following_url":"https://api.github.com/users/hlhoots/following{/other_user}","gists_url":"https://api.github.com/users/hlhoots/gists{/gist_id}","starred_url":"https://api.github.com/users/hlhoots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlhoots/subscriptions","organizations_url":"https://api.github.com/users/hlhoots/orgs","repos_url":"https://api.github.com/users/hlhoots/repos","events_url":"https://api.github.com/users/hlhoots/events{/privacy}","received_events_url":"https://api.github.com/users/hlhoots/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-01-31T15:05:15Z","updated_at":"2018-02-05T17:41:08Z","closed_at":"2018-02-05T17:41:08Z","author_association":"MEMBER","body":"@gjdeval noted that Docker has nuances in use of Runtime.getRuntime.availableProcessors() and therefore made a utility class CpuInfo to house that logic. CpuInfo is in com.ibm.ws.kernel.service and already exists, so in theory this is a straightforward replacement of that call with CpuInfo.getAvailableProcessors()\r\n\r\nGary generated this list...\r\n```\r\ncom.ibm.tx.core/src/com/ibm/tx/jta/impl/FailureScopeController.java:    protected static final boolean isConcurrent = Runtime.getRuntime().availableProcessors() > SMP_THRESH;\r\ncom.ibm.tx.util/src/com/ibm/tx/util/ConcurrentHashSet.java:        final int baseVal = Runtime.getRuntime().availableProcessors() * 20;\r\ncom.ibm.ws.channelfw/src/com/ibm/io/async/AsyncProperties.java:                maxThreadsWaitingForEvents = Runtime.getRuntime().availableProcessors();\r\ncom.ibm.ws.container.service.compat/src/com/ibm/ws/util/BoundedBuffer.java:        SPINS_TAKE_ = Integer.getInteger(\"com.ibm.ws.util.BoundedBuffer.spins_take\", Runtime.\r\ncom.ibm.ws.config/src/com/ibm/ws/config/admin/internal/UpdateQueue.java:        int maxSize = Runtime.getRuntime().availableProcessors();getRuntime().availableProcessors() - 1).intValue(); // D371967\r\ncom.ibm.ws.container.service.compat/src/com/ibm/ws/util/BoundedBuffer.java:        private final boolean useRwl = Runtime.getRuntime().availableProcessors() > 4;\r\ncom.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/CustomProperties.java:  private int _max_reconstitute_threadpool_size = Runtime.getRuntime().availableProcessors();\r\ncom.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/DestinationManager.java:                int noOfCores = Runtime.getRuntime().availableProcessors();\r\ncom.ibm.ws.microprofile.metrics/src/com/ibm/ws/microprofile/metrics/impl/Striped64.java:    static final int NCPU = Runtime.getRuntime().availableProcessors();\r\ncom.ibm.ws.threading/src/com/ibm/ws/threading/internal/BoundedBuffer.java:        SPINS_TAKE_ = Integer.getInteger(\"com.ibm.ws.util.BoundedBuffer.spins_take\", Runtime.getRuntime().availableProcessors() - 1).intValue(); // D371967\r\ncom.ibm.ws.threading/test/com/ibm/ws/threading/internal/ThreadPoolThroughputTest.java:    static int poolSize = Runtime.getRuntime().availableProcessors();\r\ncom.ibm.ws.threading/test/com/ibm/ws/threading/internal/ThreadPoolThroughputTest.java:        final int availableProcessors = Runtime.getRuntime().availableProcessors();\r\n```"}}
{"actor":{"display_login":"hlhoots"}}