benchmark-4dn


Namebenchmark-4dn JSON
Version 0.5.23 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_time2023-04-11 13:48:13
maintainer
docs_urlNone
authorSoo Lee
requires_python>=3.5,<4.0
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.

[![Build Status](https://travis-ci.org/SooLee/Benchmark.svg?branch=master)](https://travis-ci.org/SooLee/Benchmark)

### 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": "",
    "docs_url": null,
    "requires_python": ">=3.5,<4.0",
    "maintainer_email": "",
    "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/77/b8/7a1066197dcf61dc96452ac531b2ab45e07a6b966229127da68f5fa19285/Benchmark-4dn-0.5.23.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[![Build Status](https://travis-ci.org/SooLee/Benchmark.svg?branch=master)](https://travis-ci.org/SooLee/Benchmark)\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\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.23",
    "split_keywords": [
        "benchmark",
        "cwl",
        "common workflow language",
        "docker",
        "tibanna",
        "bioinformatics",
        "4dn"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cc27e63086c8ce1b848304aeae195b3fdc2f15cecc29a681ff47016178e1ba22",
                "md5": "f70212fc07fa80b7a97c0f6de78f0b0a",
                "sha256": "bd8aa8c252e868f1d7afa2c2003e1148f409e6dc825af5656f37cd5fec30e2c3"
            },
            "downloads": -1,
            "filename": "benchmark_4dn-0.5.23-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f70212fc07fa80b7a97c0f6de78f0b0a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5,<4.0",
            "size": 32671,
            "upload_time": "2023-04-11T13:48:11",
            "upload_time_iso_8601": "2023-04-11T13:48:11.507065Z",
            "url": "https://files.pythonhosted.org/packages/cc/27/e63086c8ce1b848304aeae195b3fdc2f15cecc29a681ff47016178e1ba22/benchmark_4dn-0.5.23-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77b87a1066197dcf61dc96452ac531b2ab45e07a6b966229127da68f5fa19285",
                "md5": "ec727d518b0e4a1a4c5f7ddff9d0d5d3",
                "sha256": "f17a02c5cd9669f96ea65cb31603106bb77a0a01775b4fd2983a95ab66ee7b7c"
            },
            "downloads": -1,
            "filename": "Benchmark-4dn-0.5.23.tar.gz",
            "has_sig": false,
            "md5_digest": "ec727d518b0e4a1a4c5f7ddff9d0d5d3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5,<4.0",
            "size": 32561,
            "upload_time": "2023-04-11T13:48:13",
            "upload_time_iso_8601": "2023-04-11T13:48:13.234889Z",
            "url": "https://files.pythonhosted.org/packages/77/b8/7a1066197dcf61dc96452ac531b2ab45e07a6b966229127da68f5fa19285/Benchmark-4dn-0.5.23.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-11 13:48:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "SooLee",
    "github_project": "Benchmark",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "benchmark-4dn"
}
        
Elapsed time: 0.06614s