Skip to content

Commit

Permalink
API overhaul - CentralProcessor, LogicalProcessor (#779)
Browse files Browse the repository at this point in the history
* New LogicalProcessor class

* Logical Processor numbering

* Per processor ticks

* Make LogicalProcessor an inner class

* Fix Codacy review

* Processor Frequency, Windows implementation

* MacOS implementation

* Fix types on NTPowerInformation

* Linux implementation

* Solaris implementation

* FreeBSD implementation

* Fix tests

* FreeBsd and Solaris testing/fixes

* SystemInfoTest
  • Loading branch information
dbwiddis committed Jan 24, 2019
1 parent c8930dc commit 3bc5e5f
Show file tree
Hide file tree
Showing 19 changed files with 864 additions and 546 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* [#774](https://github.com/oshi/oshi/pull/774): API overhaul - ComputerSystem, Baseboard, and Firmware. - [@dbwiddis](https://github.com/dbwiddis).
* [#775](https://github.com/oshi/oshi/pull/775): API overhaul - GlobalMemory, new VirtualMemory. - [@dbwiddis](https://github.com/dbwiddis).
* [#776](https://github.com/oshi/oshi/pull/776): oshi-demo artifact. - [@dbwiddis](https://github.com/dbwiddis).
* [#779](https://github.com/oshi/oshi/pull/779): API overhaul - CentralProcessor, new LogicalProcessor. - [@dbwiddis](https://github.com/dbwiddis).
* Your contribution here.

3.13.0 (1/18/2019)
Expand Down
18 changes: 14 additions & 4 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ to demonstrate OSHI's capabilities and integration with other libraries.

## API Changes

There is a new `VirtualMemory `class which is accessible with a getter from
`GlobalMemory`. Methods associated with swap file usage were moved to this
new class.

Several changes in the API highlight which attributes do not change and which
fetch dynamic information, as well as highlight operations with latency or
expensive computations. In general the following rules are followed:
Expand All @@ -29,6 +25,20 @@ available to cause the getters to return updated values.
The following getX() methods are now queryX():
- TBD

There is a new `VirtualMemory `class which is accessible with a getter from
`GlobalMemory`. Methods associated with swap file usage were moved to this
new class.

The `CentralProcessor` setters were removed from the API. The methods
`getSystemCpuLoadBetweenTicks()` and `getProcessorCpuLoadBetweenTicks()` now take
an argument with the previous set of ticks, rather than internally saving the
previous call. This enables users to measure over a longer period or multiple
different periods. The `getSystemCpuLoad()` method is now a direct passthrough
to the `OperatingSystemMXBean` method if running an Oracle JVM, otherwise it
returns a negative value. The no-argument `getSystemLoadAverage()` has been
removed; users can call with an argument of 1 to obtain the same value.


# Guide to upgrading from OSHI 2.x to 3.x

The most significant change in OSHI 3.0 is the separation of JSON output to a
Expand Down

0 comments on commit 3bc5e5f

Please sign in to comment.