From 7bf3d653b4f57b31ae104c8a09b5a719ca589ca1 Mon Sep 17 00:00:00 2001 From: IlnurHA Date: Sat, 25 May 2024 22:02:38 -0500 Subject: [PATCH 1/6] added description of execution results for 'metrics.sh' and 'metrics-file.sh' files during make exectution inside 'metrics/README.md' --- metrics/README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/metrics/README.md b/metrics/README.md index 660407b7..36365e9a 100644 --- a/metrics/README.md +++ b/metrics/README.md @@ -1,4 +1,6 @@ -# How Metrics Work +# Metrics + +## How Metrics Work Every executable file in this directory is a calculator of a few metrics. They all are expected to be executed like this: @@ -25,3 +27,32 @@ the name of the metric. The second one contains the value (float or integer). The third one contains the description of the metric (in general, NOT for this particular file). A space is mandatory between the first and the second column, and between the second and the third columns. + +## Metrics in make + +Metrics could be calculated in **measure** step presented in makefile. +Firstly, executed `steps/measure.sh` that performs preparation steps: + +* Creating necessary files and directories +* Collecting jobs to execute in parallel + (Currently, one for each java file to analyze metrics for) +* Executes jobs using `help/parallel.sh` + +For each job it executes `steps/metrics-file.sh` +that creates the following file structure: + +```text +dataset/ + measurements/ + yegor256/ + cactoos/ + Main.java.m + Main.java.m.LOC + Main.java.m.CC + Main.java.m.CoCo + ... +``` + +Where `{file_name}.java.m` is used as a buffer to store intermediate results +during calculations and `{file_name}.java.m.{metric_name}` stores calculated metric, +which has `{metric_name}` name, for the file with `{file_name}` name \ No newline at end of file From 793d8ec4a57e1deb8f61de0334fbea52ad0bb819 Mon Sep 17 00:00:00 2001 From: IlnurHA Date: Sat, 25 May 2024 22:08:54 -0500 Subject: [PATCH 2/6] Fixed file name specified in README --- metrics/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics/README.md b/metrics/README.md index 36365e9a..c943cc4d 100644 --- a/metrics/README.md +++ b/metrics/README.md @@ -38,7 +38,7 @@ Firstly, executed `steps/measure.sh` that performs preparation steps: (Currently, one for each java file to analyze metrics for) * Executes jobs using `help/parallel.sh` -For each job it executes `steps/metrics-file.sh` +For each job it executes `steps/measure-file.sh` that creates the following file structure: ```text From ebc0917c5d91ea9683010662b964af740d05b60a Mon Sep 17 00:00:00 2001 From: IlnurHA Date: Sat, 25 May 2024 22:14:03 -0500 Subject: [PATCH 3/6] fix errors from markdown linter --- metrics/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/metrics/README.md b/metrics/README.md index c943cc4d..9e4ca823 100644 --- a/metrics/README.md +++ b/metrics/README.md @@ -54,5 +54,6 @@ dataset/ ``` Where `{file_name}.java.m` is used as a buffer to store intermediate results -during calculations and `{file_name}.java.m.{metric_name}` stores calculated metric, -which has `{metric_name}` name, for the file with `{file_name}` name \ No newline at end of file +during calculations and `{file_name}.java.m.{metric_name}` +stores calculated metric, which has `{metric_name}` name, +for the file with `{file_name}` name From 978ffd4ccbf12fbf9db56c90a2599c22f8048943 Mon Sep 17 00:00:00 2001 From: IlnurHA Date: Sun, 26 May 2024 08:24:53 -0500 Subject: [PATCH 4/6] fixed mistakes mentioned in comments --- metrics/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metrics/README.md b/metrics/README.md index 9e4ca823..8cfead8f 100644 --- a/metrics/README.md +++ b/metrics/README.md @@ -30,13 +30,13 @@ second column, and between the second and the third columns. ## Metrics in make -Metrics could be calculated in **measure** step presented in makefile. +Metrics could be calculated in measure step presented in `Makefile`. Firstly, executed `steps/measure.sh` that performs preparation steps: * Creating necessary files and directories * Collecting jobs to execute in parallel (Currently, one for each java file to analyze metrics for) -* Executes jobs using `help/parallel.sh` +* Executing jobs using `help/parallel.sh` For each job it executes `steps/measure-file.sh` that creates the following file structure: From a1fdf24330bd4b1eb18eea0af42b00ea1a60e805 Mon Sep 17 00:00:00 2001 From: IlnurHA Date: Sun, 26 May 2024 23:38:52 -0500 Subject: [PATCH 5/6] rephrased process description using ChatGPT --- metrics/README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/metrics/README.md b/metrics/README.md index 8cfead8f..b27bfbb7 100644 --- a/metrics/README.md +++ b/metrics/README.md @@ -28,18 +28,19 @@ The third one contains the description of the metric (in general, NOT for this particular file). A space is mandatory between the first and the second column, and between the second and the third columns. -## Metrics in make +## Metrics Calculation -Metrics could be calculated in measure step presented in `Makefile`. -Firstly, executed `steps/measure.sh` that performs preparation steps: +Metrics calculation can be elegantly managed during the measure step outlined +in the `Makefile`. This process initiates with the execution of `steps/measure.sh`, +which performs several preparatory tasks: -* Creating necessary files and directories -* Collecting jobs to execute in parallel - (Currently, one for each java file to analyze metrics for) -* Executing jobs using `help/parallel.sh` +1. Creating the necessary files and directories. +2. Collecting jobs to execute in parallel, + with one job designated for each Java file to analyze metrics. +3. Running the jobs using `help/parallel.sh`. -For each job it executes `steps/measure-file.sh` -that creates the following file structure: +For each job, `steps/measure-file.sh` is executed, +resulting in the following organized file structure: ```text dataset/ @@ -53,7 +54,8 @@ dataset/ ... ``` -Where `{file_name}.java.m` is used as a buffer to store intermediate results -during calculations and `{file_name}.java.m.{metric_name}` -stores calculated metric, which has `{metric_name}` name, -for the file with `{file_name}` name +In this structure, `{file_name}.m` serves as a buffer +for intermediate results during calculations. +The files named `{file_name}.m.{metric_name}` store the calculated metrics, +where `{metric_name}` corresponds to the specific metric +for the file `{file_name}`. \ No newline at end of file From 23b9844f47fa348c1a7e0a01f456914de32be104 Mon Sep 17 00:00:00 2001 From: IlnurHA Date: Sun, 26 May 2024 23:39:55 -0500 Subject: [PATCH 6/6] fixed problem from markdown linter --- metrics/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics/README.md b/metrics/README.md index b27bfbb7..24fba4f5 100644 --- a/metrics/README.md +++ b/metrics/README.md @@ -58,4 +58,4 @@ In this structure, `{file_name}.m` serves as a buffer for intermediate results during calculations. The files named `{file_name}.m.{metric_name}` store the calculated metrics, where `{metric_name}` corresponds to the specific metric -for the file `{file_name}`. \ No newline at end of file +for the file `{file_name}`.