diff options
author | Henrik Nord <[email protected]> | 2012-05-31 15:59:00 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-05-31 15:59:00 +0200 |
commit | 523516d049cd246fd68f5ec69c56fd4d5b8172f5 (patch) | |
tree | 594c6ad6520668158862d14dc800bccff4d20a76 /lib/dialyzer/src/dialyzer_utils.erl | |
parent | 44870b7f3640946f6d80599a8a36314dbafce70f (diff) | |
parent | 3e348c69b6921dd0e2c5b699ccd36d46321c953c (diff) | |
download | otp-523516d049cd246fd68f5ec69c56fd4d5b8172f5.tar.gz otp-523516d049cd246fd68f5ec69c56fd4d5b8172f5.tar.bz2 otp-523516d049cd246fd68f5ec69c56fd4d5b8172f5.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/dialyzer/src/dialyzer_utils.erl')
-rw-r--r-- | lib/dialyzer/src/dialyzer_utils.erl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/dialyzer/src/dialyzer_utils.erl b/lib/dialyzer/src/dialyzer_utils.erl index 2a248fb028..149e777e1f 100644 --- a/lib/dialyzer/src/dialyzer_utils.erl +++ b/lib/dialyzer/src/dialyzer_utils.erl @@ -43,7 +43,8 @@ pp_hook/0, process_record_remote_types/1, sets_filter/2, - src_compiler_opts/0 + src_compiler_opts/0, + parallelism/0 ]). -include("dialyzer.hrl"). @@ -536,3 +537,12 @@ pp_unit(Unit, Ctxt, Cont) -> pp_atom(Atom) -> String = atom_to_list(cerl:atom_val(Atom)), prettypr:text(String). + +%%------------------------------------------------------------------------------ + +-spec parallelism() -> integer(). + +parallelism() -> + CPUs = erlang:system_info(logical_processors_available), + Schedulers = erlang:system_info(schedulers), + min(CPUs, Schedulers). |