1#!/usr/bin/env python 2# -*- coding: utf-8 -*- 3# Copyright 2018 The Chromium Authors. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7# This script shows cpu count to specify capacity of action pool. 8 9import multiprocessing 10import sys 11 12 13def main(): 14 try: 15 cpu_count = multiprocessing.cpu_count() 16 except: # noqa E722 17 cpu_count = 1 18 19 print(cpu_count) 20 return 0 21 22 23if __name__ == '__main__': 24 sys.exit(main()) 25