Skip to content

Commit

Permalink
several minor adjustments according to change request
Browse files Browse the repository at this point in the history
  • Loading branch information
HLWeil committed Mar 19, 2024
1 parent 2c74476 commit faaba01
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 27 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,11 @@
| :--------|-----------:|
|<a href="https://www.nuget.org/packages/ARCtrl/"><img alt="Nuget" src="https://img.shields.io/nuget/vpre/ARCtrl?logo=nuget&color=%234fb3d9"></a>|<a href="https://www.nuget.org/packages/ARCtrl/"><img alt="Nuget" src="https://img.shields.io/nuget/dt/ARCtrl?color=%234FB3D9"></a>|
|<a href="https://www.npmjs.com/package/@nfdi4plants/arctrl"><img alt="NPM" src="https://img.shields.io/npm/v/%40nfdi4plants/arctrl?logo=npm&color=%234fb3d9"></a>|<a href="https://www.npmjs.com/package/@nfdi4plants/arctrl"><img alt="NPM" src="https://img.shields.io/npm/dt/%40nfdi4plants%2Farctrl?color=%234fb3d9"></a>|
|<a href="https://pypi.org/project/ARCtrl/"><img alt="PyPI" src="https://img.shields.io/pypi/v/arctrl?logo=pypi&color=%234fb3d9"></a>|<a href="https://pypi.org/project/ARCtrl/"><img alt="PyPI" src="https://img.shields.io/pypi/dm/arctrl?color=%234fb3d9"></a>|

## 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 |
|<a href="https://pypi.org/project/ARCtrl/"><img alt="PyPI" src="https://img.shields.io/pypi/v/arctrl?logo=pypi&color=%234fb3d9"></a>|<a href="https://pypi.org/project/ARCtrl/"><img alt="PyPI" src="https://img.shields.io/pepy/dt/arctrl?color=%234fb3d9"></a>|

## Install

### .NET
#### .NET

```fsharp
#r "nuget: ARCtrl"
Expand All @@ -35,16 +20,16 @@ Measured on 13th Gen Intel(R) Core(TM) i7-13800H
<PackageReference Include="ARCtrl" Version="1.1.0" />
```

### JavaScript
#### JavaScript

```bash
npm i @nfdi4plants/arctrl
```

### Python
#### Python

```bash
pip install python
pip install arctrl
```

## Docs
Expand All @@ -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)
Expand All @@ -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

Expand All @@ -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 |
5 changes: 1 addition & 4 deletions tests/Speedtest/PerformanceReport.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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) |
Expand Down
1 change: 0 additions & 1 deletion tests/Speedtest/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ let main argv =
1
#endif
else
printfn "ARE YOU DOING STUFF?"
//let argumentNumber =
// #if FABLE_COMPILER_JAVASCRIPT
// 1
Expand Down
5 changes: 5 additions & 0 deletions tests/Speedtest/Speedtest.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
</PropertyGroup>

<ItemGroup>
<None Include="PerformanceReport/PerformanceReport_FSharp.md" />
<None Include="PerformanceReport/PerformanceReport_JavaScript.md" />
<None Include="PerformanceReport/PerformanceReport_Python.md" />
<Compile Include="FillMissing.fs" />
<Compile Include="ManyStudies.fs" />
<Compile Include="LargeStudy.fs" />
Expand All @@ -14,6 +17,8 @@
<Compile Include="Program.fs" />
</ItemGroup>

<ItemGroup />

<ItemGroup>
<ProjectReference Include="..\..\src\ISA\ISA.Json\ARCtrl.ISA.Json.fsproj" />
<ProjectReference Include="..\..\src\ISA\ISA.Spreadsheet\ARCtrl.ISA.Spreadsheet.fsproj" />
Expand Down

0 comments on commit faaba01

Please sign in to comment.