benchmark-4dn


Namebenchmark-4dn JSON
Version 0.5.25 PyPI version JSON
download
home_pagehttps://github.com/SooLee/Benchmark/
SummaryBenchmark functions that returns total space, mem, cpu given input size and parameters for the CWL workflows
upload_time2024-11-20 19:34:31
maintainerNone
docs_urlNone
authorSoo Lee
requires_python<4.0,>=3.5
licenseMIT
keywords benchmark cwl common workflow language docker tibanna bioinformatics 4dn
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            The repo contains a benchmarking script for some of the CWL workflows used by 4DN-DCIC (https://github.com/4dn-dcic/pipelines-cwl), that returns total space, mem and CPUs required per given input size and a recommended AWS EC2 instance type.

### Example usage of benchmarking script
* importing the module
```python
from Benchmark import run as B
```

* md5
```python
app_name = 'md5'
input_json = {'input_size_in_bytes': {'input_file': 20000}}
B.benchmark(app_name, input_json)
```
```
{'aws': {'recommended_instance_type': 't2.xlarge', 'EBS_optimized': False, 'cost_in_usd': 0.188, 'EBS_optimization_surcharge': None, 'mem_in_gb': 16.0, 'cpu': 4}, 'total_size_in_GB': 14.855186462402344, 'total_mem_in_MB': 13142.84375, 'min_CPU': 4}
```

* fastqc-0-11-4-1
```python
app_name = 'fastqc-0-11-4-1'
input_json = {'input_size_in_bytes': {'input_fastq':20000},
              'parameters': {'threads': 2}}
B.benchmark(app_name, input_json)
```
```
{'recommended_instance_type': 't2.nano', 'EBS_optimized': False, 'cost_in_usd': 0.006, 'EBS_optimization_surcharge': None, 'mem_in_gb': 0.5, 'cpu': 1}
```

* bwa-mem
```python
app_name = 'bwa-mem'
input_json = {'input_size_in_bytes': {'fastq1':93520000,
                                      'fastq2':97604000,
                                      'bwa_index':3364568000},
              'parameters': {'nThreads': 4}}
B.benchmark(app_name, input_json)
```
```
{'aws': {'cost_in_usd': 0.188, 'EBS_optimization_surcharge': None, 'EBS_optimized': False, 'cpu': 4, 'mem_in_gb': 16.0, 'recommended_instance_type': 't2.xlarge'}, 'total_mem_in_MB': 12834.808349609375, 'total_size_in_GB': 15.502477258443832, 'min_CPU': 4}
```

To use Benchmark in from other places, install it as below.
```
pip install Benchmark-4dn
```
or
```
pip install git+git://github.com/SooLee/Benchmark.git
```


---

Note: From `0.5.3` we have a new function that takes in cpu and memory and returns a sorted list of instance dictionaries.
```
get_instance_types(cpu=1, mem_in_gb=0.5, instances=instance_list(), top=10, rank='cost_in_usd')
```

Keys in each instance dictionary:
```
'cost_in_usd', 'mem_in_gb', 'cpu', 'instance_type', 'EBS_optimized', 'EBS_optimization_surcharge'
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/SooLee/Benchmark/",
    "name": "benchmark-4dn",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.5",
    "maintainer_email": null,
    "keywords": "benchmark, cwl, common workflow language, docker, tibanna, bioinformatics, 4dn",
    "author": "Soo Lee",
    "author_email": "duplexa@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/14/19/adcf8335af351da6c1c68667082a7b42308ec8fc7c720ff825c9e22cab18/benchmark_4dn-0.5.25.tar.gz",
    "platform": null,
    "description": "The repo contains a benchmarking script for some of the CWL workflows used by 4DN-DCIC (https://github.com/4dn-dcic/pipelines-cwl), that returns total space, mem and CPUs required per given input size and a recommended AWS EC2 instance type.\n\n### Example usage of benchmarking script\n* importing the module\n```python\nfrom Benchmark import run as B\n```\n\n* md5\n```python\napp_name = 'md5'\ninput_json = {'input_size_in_bytes': {'input_file': 20000}}\nB.benchmark(app_name, input_json)\n```\n```\n{'aws': {'recommended_instance_type': 't2.xlarge', 'EBS_optimized': False, 'cost_in_usd': 0.188, 'EBS_optimization_surcharge': None, 'mem_in_gb': 16.0, 'cpu': 4}, 'total_size_in_GB': 14.855186462402344, 'total_mem_in_MB': 13142.84375, 'min_CPU': 4}\n```\n\n* fastqc-0-11-4-1\n```python\napp_name = 'fastqc-0-11-4-1'\ninput_json = {'input_size_in_bytes': {'input_fastq':20000},\n              'parameters': {'threads': 2}}\nB.benchmark(app_name, input_json)\n```\n```\n{'recommended_instance_type': 't2.nano', 'EBS_optimized': False, 'cost_in_usd': 0.006, 'EBS_optimization_surcharge': None, 'mem_in_gb': 0.5, 'cpu': 1}\n```\n\n* bwa-mem\n```python\napp_name = 'bwa-mem'\ninput_json = {'input_size_in_bytes': {'fastq1':93520000,\n                                      'fastq2':97604000,\n                                      'bwa_index':3364568000},\n              'parameters': {'nThreads': 4}}\nB.benchmark(app_name, input_json)\n```\n```\n{'aws': {'cost_in_usd': 0.188, 'EBS_optimization_surcharge': None, 'EBS_optimized': False, 'cpu': 4, 'mem_in_gb': 16.0, 'recommended_instance_type': 't2.xlarge'}, 'total_mem_in_MB': 12834.808349609375, 'total_size_in_GB': 15.502477258443832, 'min_CPU': 4}\n```\n\nTo use Benchmark in from other places, install it as below.\n```\npip install Benchmark-4dn\n```\nor\n```\npip install git+git://github.com/SooLee/Benchmark.git\n```\n\n\n---\n\nNote: From `0.5.3` we have a new function that takes in cpu and memory and returns a sorted list of instance dictionaries.\n```\nget_instance_types(cpu=1, mem_in_gb=0.5, instances=instance_list(), top=10, rank='cost_in_usd')\n```\n\nKeys in each instance dictionary:\n```\n'cost_in_usd', 'mem_in_gb', 'cpu', 'instance_type', 'EBS_optimized', 'EBS_optimization_surcharge'\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Benchmark functions that returns total space, mem, cpu given input size and parameters for the CWL workflows",
    "version": "0.5.25",
    "project_urls": {
        "Homepage": "https://github.com/SooLee/Benchmark/",
        "Repository": "https://github.com/SooLee/Benchmark/"
    },
    "split_keywords": [
        "benchmark",
        " cwl",
        " common workflow language",
        " docker",
        " tibanna",
        " bioinformatics",
        " 4dn"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18f04f304ee1cbd707427704072644709743151a213a54e89075efa80a1af035",
                "md5": "d6b85c30125f266eb483fb532b4e498b",
                "sha256": "5bbe0d4e3f170fdbe180289329624378d4c85f7e0525cade4452912ce1f055f3"
            },
            "downloads": -1,
            "filename": "benchmark_4dn-0.5.25-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d6b85c30125f266eb483fb532b4e498b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.5",
            "size": 31796,
            "upload_time": "2024-11-20T19:34:29",
            "upload_time_iso_8601": "2024-11-20T19:34:29.862678Z",
            "url": "https://files.pythonhosted.org/packages/18/f0/4f304ee1cbd707427704072644709743151a213a54e89075efa80a1af035/benchmark_4dn-0.5.25-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1419adcf8335af351da6c1c68667082a7b42308ec8fc7c720ff825c9e22cab18",
                "md5": "ffea116ffa8ec815a4345e3b7522bbec",
                "sha256": "b3862e927bf6d49989c4b0412b28835fb9b2fcadd7678bb3ebb8f38c762297bd"
            },
            "downloads": -1,
            "filename": "benchmark_4dn-0.5.25.tar.gz",
            "has_sig": false,
            "md5_digest": "ffea116ffa8ec815a4345e3b7522bbec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.5",
            "size": 31360,
            "upload_time": "2024-11-20T19:34:31",
            "upload_time_iso_8601": "2024-11-20T19:34:31.612640Z",
            "url": "https://files.pythonhosted.org/packages/14/19/adcf8335af351da6c1c68667082a7b42308ec8fc7c720ff825c9e22cab18/benchmark_4dn-0.5.25.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-20 19:34:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SooLee",
    "github_project": "Benchmark",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "benchmark-4dn"
}
        
Elapsed time: 0.81119s