From 60e682897f98d9374b96c6324759f302170b2a17 Mon Sep 17 00:00:00 2001 From: Stavros Aronis Date: Mon, 20 Feb 2012 13:56:25 +0100 Subject: Add --time option to Dialyzer --- lib/dialyzer/src/dialyzer_cl_parse.erl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/dialyzer/src/dialyzer_cl_parse.erl') diff --git a/lib/dialyzer/src/dialyzer_cl_parse.erl b/lib/dialyzer/src/dialyzer_cl_parse.erl index ff8fc39a5e..5baba7d11b 100644 --- a/lib/dialyzer/src/dialyzer_cl_parse.erl +++ b/lib/dialyzer/src/dialyzer_cl_parse.erl @@ -164,6 +164,9 @@ cl(["--src"|T]) -> cl(["--no_spec"|T]) -> put(dialyzer_options_use_contracts, false), cl(T); +cl(["--time"|T]) -> + put(dialyzer_timing, true), + cl(T); cl(["-v"|_]) -> io:format("Dialyzer version "++?VSN++"\n"), erlang:halt(?RET_NOTHING_SUSPICIOUS); @@ -250,6 +253,7 @@ init() -> put(dialyzer_output_format, formatted), put(dialyzer_filename_opt, basename), put(dialyzer_options_check_plt, DefaultOpts#options.check_plt), + put(dialyzer_timing, DefaultOpts#options.timing), ok. append_defines([Def, Val]) -> @@ -290,6 +294,7 @@ cl_options() -> {filename_opt, get(dialyzer_filename_opt)}, {analysis_type, get(dialyzer_options_analysis_type)}, {get_warnings, get(dialyzer_options_get_warnings)}, + {timing, get(dialyzer_timing)}, {callgraph_file, get(dialyzer_callgraph_file)} |common_options()]. @@ -351,7 +356,7 @@ help_message() -> [--apps applications] [-o outfile] [--build_plt] [--add_to_plt] [--remove_from_plt] [--check_plt] [--no_check_plt] [--plt_info] [--get_warnings] - [--no_native] [--fullpath] + [--no_native] [--fullpath] [--time] Options: files_or_dirs (for backwards compatibility also as: -c files_or_dirs) Use Dialyzer from the command line to detect defects in the @@ -418,6 +423,8 @@ Options: Make Dialyzer a bit more quiet. --verbose Make Dialyzer a bit more verbose. + --time + Print time information --build_plt The analysis starts from an empty plt and creates a new one from the files specified with -c and -r. Only works for beam files. -- cgit v1.2.3 From 4a1fa04e5f57ad56e35aae8e9ff278bf1133889a Mon Sep 17 00:00:00 2001 From: Stavros Aronis Date: Mon, 5 Mar 2012 11:39:28 +0100 Subject: Change --time to --statistics and include more info --- lib/dialyzer/src/dialyzer_cl_parse.erl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/dialyzer/src/dialyzer_cl_parse.erl') diff --git a/lib/dialyzer/src/dialyzer_cl_parse.erl b/lib/dialyzer/src/dialyzer_cl_parse.erl index 5baba7d11b..05e50c3d6b 100644 --- a/lib/dialyzer/src/dialyzer_cl_parse.erl +++ b/lib/dialyzer/src/dialyzer_cl_parse.erl @@ -164,7 +164,7 @@ cl(["--src"|T]) -> cl(["--no_spec"|T]) -> put(dialyzer_options_use_contracts, false), cl(T); -cl(["--time"|T]) -> +cl(["--statistics"|T]) -> put(dialyzer_timing, true), cl(T); cl(["-v"|_]) -> @@ -356,7 +356,7 @@ help_message() -> [--apps applications] [-o outfile] [--build_plt] [--add_to_plt] [--remove_from_plt] [--check_plt] [--no_check_plt] [--plt_info] [--get_warnings] - [--no_native] [--fullpath] [--time] + [--no_native] [--fullpath] [--statistics] Options: files_or_dirs (for backwards compatibility also as: -c files_or_dirs) Use Dialyzer from the command line to detect defects in the @@ -423,8 +423,9 @@ Options: Make Dialyzer a bit more quiet. --verbose Make Dialyzer a bit more verbose. - --time - Print time information + --statistics + Prints information about the progress of execution (analysis phases, + time spent in each and size of the relative input). --build_plt The analysis starts from an empty plt and creates a new one from the files specified with -c and -r. Only works for beam files. -- cgit v1.2.3 From 49c657461866f0fe87de2ee7578b46b1b926db10 Mon Sep 17 00:00:00 2001 From: Stavros Aronis Date: Wed, 28 Mar 2012 16:11:36 +0200 Subject: Logfile-like statistics (enabled with --resources) --- lib/dialyzer/src/dialyzer_cl_parse.erl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/dialyzer/src/dialyzer_cl_parse.erl') diff --git a/lib/dialyzer/src/dialyzer_cl_parse.erl b/lib/dialyzer/src/dialyzer_cl_parse.erl index 05e50c3d6b..205b97ccf9 100644 --- a/lib/dialyzer/src/dialyzer_cl_parse.erl +++ b/lib/dialyzer/src/dialyzer_cl_parse.erl @@ -167,6 +167,10 @@ cl(["--no_spec"|T]) -> cl(["--statistics"|T]) -> put(dialyzer_timing, true), cl(T); +cl(["--resources"|T]) -> + put(dialyzer_options_report_mode, quiet), + put(dialyzer_timing, debug), + cl(T); cl(["-v"|_]) -> io:format("Dialyzer version "++?VSN++"\n"), erlang:halt(?RET_NOTHING_SUSPICIOUS); -- cgit v1.2.3