From faaba01fb783797cbb459e541577cbe35636a883 Mon Sep 17 00:00:00 2001 From: HLWeil Date: Tue, 19 Mar 2024 10:00:10 +0100 Subject: [PATCH] several minor adjustments according to change request --- README.md | 44 +++++++++---------- tests/Speedtest/PerformanceReport.fs | 5 +-- ...bined.md => PerformanceReport_Combined.md} | 2 + ..._FSharp.md => PerformanceReport_FSharp.md} | 0 ...ipt.md => PerformanceReport_JavaScript.md} | 0 ..._Python.md => PerformanceReport_Python.md} | 0 tests/Speedtest/Program.fs | 1 - tests/Speedtest/Speedtest.fsproj | 5 +++ 8 files changed, 30 insertions(+), 27 deletions(-) rename tests/Speedtest/PerformanceReport/{2024_3_15_PerformanceReport_Combined.md => PerformanceReport_Combined.md} (98%) rename tests/Speedtest/PerformanceReport/{2024_3_15_PerformanceReport_FSharp.md => PerformanceReport_FSharp.md} (100%) rename tests/Speedtest/PerformanceReport/{2024_3_15_PerformanceReport_JavaScript.md => PerformanceReport_JavaScript.md} (100%) rename tests/Speedtest/PerformanceReport/{2024_3_15_PerformanceReport_Python.md => PerformanceReport_Python.md} (100%) diff --git a/README.md b/README.md index 95412a37..6e776ec0 100644 --- a/README.md +++ b/README.md @@ -6,26 +6,11 @@ | :--------|-----------:| |Nuget|Nuget| |NPM|NPM| -|PyPI|PyPI| - -## Performance - -Measured on 13th Gen Intel(R) Core(TM) i7-13800H - -| Name | Description | FSharp Time (ms) | JavaScript Time (ms) | Python Time (ms) | -| --- | --- | --- | --- | --- | -| Table_GetHashCode | From a table with 1 column and 10000 rows, retrieve the Hash Code | 5 | 21 | 226 | -| Table_AddRows | Add 10000 rows to a table with 4 columns. | 15 | 22 | 289 | -| Table_fillMissingCells | For a table 6 columns and 20000 rows, where each row has one missing value, fill those values with default values. | 49 | 108 | 4813 | -| Table_ToJson | Serialize a table with 5 columns and 10000 rows to json. | 1099 | 481 | 6833 | -| Table_ToCompressedJson | Serialize a table with 5 columns and 10000 rows to compressed json. | 261 | 2266 | 717334 | -| Assay_toJson | Parse an assay with one table with 10000 rows and 6 columns to json | 915 | 2459 | 28799 | -| Study_FromWorkbook | Parse a workbook with one study with 10000 rows and 6 columns to an ArcStudy | 97 | 87 | 1249 | -| Investigation_ToWorkbook_ManyStudies | Parse an investigation with 1500 studies to a workbook | 621 | 379 | 9974 | +|PyPI|PyPI| ## Install -### .NET +#### .NET ```fsharp #r "nuget: ARCtrl" @@ -35,16 +20,16 @@ Measured on 13th Gen Intel(R) Core(TM) i7-13800H ``` -### JavaScript +#### JavaScript ```bash npm i @nfdi4plants/arctrl ``` -### Python +#### Python ```bash -pip install python +pip install arctrl ``` ## Docs @@ -55,7 +40,7 @@ Currently we provide some documentation in form of markdown files in the `/docs` ## Development -### Requirements +#### Requirements - [nodejs and npm](https://nodejs.org/en/download) - verify with `node --version` (Tested with v18.16.1) @@ -65,7 +50,7 @@ Currently we provide some documentation in form of markdown files in the `/docs` - [Python](https://www.python.org/downloads/) - verify with `py --version` (Tested with 3.12.2, known to work only for >=3.11) -### Local Setup +#### Local Setup 1. Setup dotnet tools @@ -86,3 +71,18 @@ Currently we provide some documentation in form of markdown files in the `/docs` 3. `.\.venv\Scripts\python.exe -m poetry install --no-root` Verify correct setup with `./build.cmd runtests` ✨ + +## Performance + +Measured on 13th Gen Intel(R) Core(TM) i7-13800H + +| Name | Description | FSharp Time (ms) | JavaScript Time (ms) | Python Time (ms) | +| --- | --- | --- | --- | --- | +| Table_GetHashCode | From a table with 1 column and 10000 rows, retrieve the Hash Code | 5 | 21 | 226 | +| Table_AddRows | Add 10000 rows to a table with 4 columns. | 15 | 22 | 289 | +| Table_fillMissingCells | For a table 6 columns and 20000 rows, where each row has one missing value, fill those values with default values. | 49 | 108 | 4813 | +| Table_ToJson | Serialize a table with 5 columns and 10000 rows to json. | 1099 | 481 | 6833 | +| Table_ToCompressedJson | Serialize a table with 5 columns and 10000 rows to compressed json. | 261 | 2266 | 717334 | +| Assay_toJson | Parse an assay with one table with 10000 rows and 6 columns to json | 915 | 2459 | 28799 | +| Study_FromWorkbook | Parse a workbook with one study with 10000 rows and 6 columns to an ArcStudy | 97 | 87 | 1249 | +| Investigation_ToWorkbook_ManyStudies | Parse an investigation with 1500 studies to a workbook | 621 | 379 | 9974 | diff --git a/tests/Speedtest/PerformanceReport.fs b/tests/Speedtest/PerformanceReport.fs index a4e05985..cf71e576 100644 --- a/tests/Speedtest/PerformanceReport.fs +++ b/tests/Speedtest/PerformanceReport.fs @@ -217,10 +217,7 @@ let lang = let runReport cpu = let report = createMarkdownPerformanceReport lang cpu - let timeString = - let dt = System.DateTime.Today - $"{dt.Year}_{dt.Month}_{dt.Day}" - let outFile = $"tests/Speedtest/PerformanceReport/{timeString}_PerformanceReport_{lang}.md" + let outFile = $"tests/Speedtest/PerformanceReport/PerformanceReport_{lang}.md" writeFile outFile report printfn "%s" report 0 diff --git a/tests/Speedtest/PerformanceReport/2024_3_15_PerformanceReport_Combined.md b/tests/Speedtest/PerformanceReport/PerformanceReport_Combined.md similarity index 98% rename from tests/Speedtest/PerformanceReport/2024_3_15_PerformanceReport_Combined.md rename to tests/Speedtest/PerformanceReport/PerformanceReport_Combined.md index 8e1daab1..1b9a6684 100644 --- a/tests/Speedtest/PerformanceReport/2024_3_15_PerformanceReport_Combined.md +++ b/tests/Speedtest/PerformanceReport/PerformanceReport_Combined.md @@ -1,3 +1,5 @@ +## 2024_15_03 + Measured on 13th Gen Intel(R) Core(TM) i7-13800H | Name | Description | FSharp Time (ms) | JavaScript Time (ms) | Python Time (ms) | diff --git a/tests/Speedtest/PerformanceReport/2024_3_15_PerformanceReport_FSharp.md b/tests/Speedtest/PerformanceReport/PerformanceReport_FSharp.md similarity index 100% rename from tests/Speedtest/PerformanceReport/2024_3_15_PerformanceReport_FSharp.md rename to tests/Speedtest/PerformanceReport/PerformanceReport_FSharp.md diff --git a/tests/Speedtest/PerformanceReport/2024_3_15_PerformanceReport_JavaScript.md b/tests/Speedtest/PerformanceReport/PerformanceReport_JavaScript.md similarity index 100% rename from tests/Speedtest/PerformanceReport/2024_3_15_PerformanceReport_JavaScript.md rename to tests/Speedtest/PerformanceReport/PerformanceReport_JavaScript.md diff --git a/tests/Speedtest/PerformanceReport/2024_3_15_PerformanceReport_Python.md b/tests/Speedtest/PerformanceReport/PerformanceReport_Python.md similarity index 100% rename from tests/Speedtest/PerformanceReport/2024_3_15_PerformanceReport_Python.md rename to tests/Speedtest/PerformanceReport/PerformanceReport_Python.md diff --git a/tests/Speedtest/Program.fs b/tests/Speedtest/Program.fs index 78acca4b..0d55aec0 100644 --- a/tests/Speedtest/Program.fs +++ b/tests/Speedtest/Program.fs @@ -69,7 +69,6 @@ let main argv = 1 #endif else - printfn "ARE YOU DOING STUFF?" //let argumentNumber = // #if FABLE_COMPILER_JAVASCRIPT // 1 diff --git a/tests/Speedtest/Speedtest.fsproj b/tests/Speedtest/Speedtest.fsproj index a9c82aef..16d21c1a 100644 --- a/tests/Speedtest/Speedtest.fsproj +++ b/tests/Speedtest/Speedtest.fsproj @@ -6,6 +6,9 @@ + + + @@ -14,6 +17,8 @@ + +