cdmpy


Namecdmpy JSON
Version 0.3.2 PyPI version JSON
download
home_page
SummaryA python script to generate CrystalDiskMark-style test result with fio. Should work across multi platforms.
upload_time2023-04-07 22:16:46
maintainer
docs_urlNone
author
requires_python>=3.9.13
licenseMIT
keywords crystaldiskmark disk utilities hdd ssd
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cdmpy

Python script packaging of [fio-cdm](https://github.com/OliverLew/fio-cdm), a python script to generate [CrystalDiskMark](https://crystalmark.info/en/software/crystaldiskmark/)-style test result with [fio](https://github.com/axboe/fio). Should work across multi platforms.

## Requirement

- fio
- python3

## Feature

- Provide some options of CrystalDiskMark, e.g., number of test runs, test file size, mixed r/w tests, zero buffers, etc
- Show IOPS and latency results for random read/write tests.
  This actually combines the "default", "peak performance" and "real world performance" tests in CrystalDiskMark
- Easy to add/customize new tests in command-line arguments
- Parse `fio` result in json format to achieve more stability

## Installation

Install via Python `pip install .`

## Usage

Call script via `cdm` after pip installation from anywhere.

```
usage: cdm [target] [-h] [-0] [-a job] [-E] [-f jobfile] [-n number] [-s size] [-x [mix]]

positional arguments:
  target      The path of the directory to test. Default to current directory.

optional arguments:
  -h, --help  show this help message and exit
  -0          Initialize buffers with zeros. Default to use random buffers.
  -a job      Manually add multiple jobs. Format is "seq|rnd,<queue depth>,<thread number>".
              This overrides the preset jobs. This option can be used more than once.
  -E          Disable extra information (iops, latency) for random IO tests. Default is enabled.
  -f jobfile  Save jobfile and quit without running fio. Use "-" to print to stdout.
  -n number   Number of tests, default is 5.
  -s size     The size of file I/O. It is directly passed to fio. Default is 1G.
  -x [mix]    Add mixed rw test. Default is disabled. <mix> is read percentage. Default is 70.

Note:
Recommend to put the <target> argument as the first one since some of the optional arguments will consume it.
```

### Sample output

The default tests are same as [CrystalDiskMark](https://crystalmark.info/en/software/crystaldiskmark/crystaldiskmark-main-menu/)

```
tests: 5, size: 1G, target: . 173.3GiB/405.1GiB
|Name        | Read(MB/s)|Write(MB/s)|  Mix(MB/s)|
|------------|-----------|-----------|-----------|
|SEQ1M Q8 T1 |    2997.60|    2056.19|    1438.19|
|SEQ1M Q1 T1 |    1986.94|    1461.67|     941.04|
|RND4K Q32T16|    1816.04|     456.98|     434.18|
|... IOPS    |  443350.17|  111546.75|  105987.62|
|... latency |    1153.89|    4587.90|    2800.43|
|RND4K Q1 T1 |      54.20|     164.86|      34.43|
|... IOPS    |   13232.15|   40248.87|    8405.20|
|... latency |      74.76|      23.04|      67.78|
```

### Examples

Set test file size to 512MB, 5 test runs with read, write and mix tests:

    cdm -s 512m -n 5 -x

Manually add jobs to replace the default ones:

    cdm -a seq,1,1 -a seq,32,1 -a rnd,16,8

Show the equivalent fio command directly (without running the test):

    cdm -f - | fio --showcmd -

## Similar projects

**Shell version**: https://github.com/buty4649/fio-cdm

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "cdmpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9.13",
    "maintainer_email": "",
    "keywords": "CrystalDiskMark,disk utilities,hdd,ssd",
    "author": "",
    "author_email": "Lu Xu <oliver_lew@outlook.com>, Pyhoniasm <26092465+Pythoniasm@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/10/72/c6ff5114f0157006426864e10c08e67031ac72702eadadf03e081d1d32f8/cdmpy-0.3.2.tar.gz",
    "platform": null,
    "description": "# cdmpy\n\nPython script packaging of [fio-cdm](https://github.com/OliverLew/fio-cdm), a python script to generate [CrystalDiskMark](https://crystalmark.info/en/software/crystaldiskmark/)-style test result with [fio](https://github.com/axboe/fio). Should work across multi platforms.\n\n## Requirement\n\n- fio\n- python3\n\n## Feature\n\n- Provide some options of CrystalDiskMark, e.g., number of test runs, test file size, mixed r/w tests, zero buffers, etc\n- Show IOPS and latency results for random read/write tests.\n  This actually combines the \"default\", \"peak performance\" and \"real world performance\" tests in CrystalDiskMark\n- Easy to add/customize new tests in command-line arguments\n- Parse `fio` result in json format to achieve more stability\n\n## Installation\n\nInstall via Python `pip install .`\n\n## Usage\n\nCall script via `cdm` after pip installation from anywhere.\n\n```\nusage: cdm [target] [-h] [-0] [-a job] [-E] [-f jobfile] [-n number] [-s size] [-x [mix]]\n\npositional arguments:\n  target      The path of the directory to test. Default to current directory.\n\noptional arguments:\n  -h, --help  show this help message and exit\n  -0          Initialize buffers with zeros. Default to use random buffers.\n  -a job      Manually add multiple jobs. Format is \"seq|rnd,<queue depth>,<thread number>\".\n              This overrides the preset jobs. This option can be used more than once.\n  -E          Disable extra information (iops, latency) for random IO tests. Default is enabled.\n  -f jobfile  Save jobfile and quit without running fio. Use \"-\" to print to stdout.\n  -n number   Number of tests, default is 5.\n  -s size     The size of file I/O. It is directly passed to fio. Default is 1G.\n  -x [mix]    Add mixed rw test. Default is disabled. <mix> is read percentage. Default is 70.\n\nNote:\nRecommend to put the <target> argument as the first one since some of the optional arguments will consume it.\n```\n\n### Sample output\n\nThe default tests are same as [CrystalDiskMark](https://crystalmark.info/en/software/crystaldiskmark/crystaldiskmark-main-menu/)\n\n```\ntests: 5, size: 1G, target: . 173.3GiB/405.1GiB\n|Name        | Read(MB/s)|Write(MB/s)|  Mix(MB/s)|\n|------------|-----------|-----------|-----------|\n|SEQ1M Q8 T1 |    2997.60|    2056.19|    1438.19|\n|SEQ1M Q1 T1 |    1986.94|    1461.67|     941.04|\n|RND4K Q32T16|    1816.04|     456.98|     434.18|\n|... IOPS    |  443350.17|  111546.75|  105987.62|\n|... latency |    1153.89|    4587.90|    2800.43|\n|RND4K Q1 T1 |      54.20|     164.86|      34.43|\n|... IOPS    |   13232.15|   40248.87|    8405.20|\n|... latency |      74.76|      23.04|      67.78|\n```\n\n### Examples\n\nSet test file size to 512MB, 5 test runs with read, write and mix tests:\n\n    cdm -s 512m -n 5 -x\n\nManually add jobs to replace the default ones:\n\n    cdm -a seq,1,1 -a seq,32,1 -a rnd,16,8\n\nShow the equivalent fio command directly (without running the test):\n\n    cdm -f - | fio --showcmd -\n\n## Similar projects\n\n**Shell version**: https://github.com/buty4649/fio-cdm\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A python script to generate CrystalDiskMark-style test result with fio. Should work across multi platforms.",
    "version": "0.3.2",
    "split_keywords": [
        "crystaldiskmark",
        "disk utilities",
        "hdd",
        "ssd"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9340ec694ddbb08540d9a2bc3d81e49d5508fa7fdff9d9080f3fd31aade5010",
                "md5": "5b65b1be90c5d928873fcfc321ab0393",
                "sha256": "017c0d68a4acd28da08fed376e0555a5fddaeb0151c9421d053bfc2c2f2f8e07"
            },
            "downloads": -1,
            "filename": "cdmpy-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5b65b1be90c5d928873fcfc321ab0393",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.13",
            "size": 8382,
            "upload_time": "2023-04-07T22:16:43",
            "upload_time_iso_8601": "2023-04-07T22:16:43.940917Z",
            "url": "https://files.pythonhosted.org/packages/e9/34/0ec694ddbb08540d9a2bc3d81e49d5508fa7fdff9d9080f3fd31aade5010/cdmpy-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1072c6ff5114f0157006426864e10c08e67031ac72702eadadf03e081d1d32f8",
                "md5": "66fe4417d529e5eff1d5badc686c312b",
                "sha256": "2594803c014ff88a13f13940a92305ca857748ab42313614627508656a4ddcb1"
            },
            "downloads": -1,
            "filename": "cdmpy-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "66fe4417d529e5eff1d5badc686c312b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.13",
            "size": 8976,
            "upload_time": "2023-04-07T22:16:46",
            "upload_time_iso_8601": "2023-04-07T22:16:46.080742Z",
            "url": "https://files.pythonhosted.org/packages/10/72/c6ff5114f0157006426864e10c08e67031ac72702eadadf03e081d1d32f8/cdmpy-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-07 22:16:46",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "cdmpy"
}
        
Elapsed time: 0.11334s