Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse size in bytes format. Parse microseconds and nanoseconds. #3600

Merged
merged 9 commits into from
Oct 9, 2018

Conversation

pshrosbree
Copy link
Contributor

@pshrosbree pshrosbree commented Sep 25, 2018

Parse byte size specifications as defined in Lightbend HOCON size in bytes format:

For single bytes, exactly these strings are supported:

  • B, b, byte, bytes

For powers of ten, exactly these strings are supported:

  • kB, kilobyte, kilobytes
  • MB, megabyte, megabytes
  • GB, gigabyte, gigabytes
  • TB, terabyte, terabytes
  • PB, petabyte, petabytes
  • EB, exabyte, exabytes

For powers of two, exactly these strings are supported:

  • K, k, Ki, KiB, kibibyte, kibibytes
  • M, m, Mi, MiB, mebibyte, mebibytes
  • G, g, Gi, GiB, gibibyte, gibibytes
  • T, t, Ti, TiB, tebibyte, tebibytes
  • P, p, Pi, PiB, pebibyte, pebibytes
  • E, e, Ei, EiB, exbibyte, exbibytes

Byte sizes larger than exbibyte cause overflows.

Added parsing of microseconds and nanoseconds

@pshrosbree pshrosbree changed the title Parse size in bytes format Parse size in bytes format. Parse ms and ns. Sep 25, 2018
@pshrosbree pshrosbree changed the title Parse size in bytes format. Parse ms and ns. Parse size in bytes format. Parse microseconds and nanoseconds. Sep 25, 2018
@pshrosbree
Copy link
Contributor Author

What does the failed unit test have to do with this PR? Is it not perhaps a flaky test?

Copy link
Contributor

@Horusiath Horusiath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

Re. failing tests - some of them are just time sensitive and on a heavily occupied machine they can fail with false negatives from time to time.

@Aaronontheweb Aaronontheweb added this to the 1.3.10 milestone Oct 2, 2018
Arkatufus added a commit to Arkatufus/HOCON that referenced this pull request Oct 6, 2018
@Aaronontheweb Aaronontheweb merged commit 860ad35 into akkadotnet:dev Oct 9, 2018
Aaronontheweb pushed a commit to akkadotnet/HOCON that referenced this pull request Oct 29, 2018
* Add unit parsing test cases

* Cross port of akkadotnet/akka.net#3600

* Update xunit and test.sdk version to the latest version.

* Update version number, copyright info, and icon url in common.props
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants