From 59b002e5c296fc8570f401627c1d6c8936895b45 Mon Sep 17 00:00:00 2001 From: nikita-vanyasin Date: Fri, 22 Feb 2019 11:19:56 +0300 Subject: [PATCH] Fix function naming --- cpu/cpu_windows.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpu/cpu_windows.go b/cpu/cpu_windows.go index 22ebbd5..4755913 100644 --- a/cpu/cpu_windows.go +++ b/cpu/cpu_windows.go @@ -61,7 +61,7 @@ func Times(percpu bool) ([]TimesStat, error) { func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) { if percpu { - return perCPUTimesWithContext() + return perCPUTimes() } var ret []TimesStat @@ -144,9 +144,9 @@ func ProcInfoWithContext(ctx context.Context) ([]Win32_PerfFormattedData_PerfOS_ } // perCPUTimes returns times stat per cpu, per core and overall for all CPUs -func perCPUTimesWithContext() ([]TimesStat, error) { +func perCPUTimes() ([]TimesStat, error) { var ret []TimesStat - stats, err := perfInfoWithContext() + stats, err := perfInfo() if err != nil { return nil, err } @@ -164,7 +164,7 @@ func perCPUTimesWithContext() ([]TimesStat, error) { } // makes call to Windows API function to retrieve performance information for each core -func perfInfoWithContext() ([]win32_SystemProcessorPerformanceInformation, error) { +func perfInfo() ([]win32_SystemProcessorPerformanceInformation, error) { // Make maxResults large for safety. // We can't invoke the api call with a results array that's too small. // If we have more than 2056 cores on a single host, then it's probably the future.