Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for osCPUInfoName (0.19 sec)

  1. src/internal/sysinfo/sysinfo_test.go

    // license that can be found in the LICENSE file.
    
    package sysinfo_test
    
    import (
    	. "internal/sysinfo"
    	"testing"
    )
    
    func TestCPUName(t *testing.T) {
    	t.Logf("CPUName: %s", CPUName())
    	t.Logf("osCPUInfoName: %s", XosCPUInfoName())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:42:42 UTC 2024
    - 343 bytes
    - Viewed (0)
  2. src/internal/sysinfo/export_test.go

    // Copyright 2023 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package sysinfo
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:42:42 UTC 2024
    - 212 bytes
    - Viewed (0)
  3. src/internal/sysinfo/cpuinfo_stub.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build !(darwin || freebsd || linux || netbsd || openbsd)
    
    package sysinfo
    
    func osCPUInfoName() string {
    	return ""
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:42:42 UTC 2024
    - 283 bytes
    - Viewed (0)
  4. src/internal/sysinfo/cpuinfo_bsd.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build darwin || freebsd || netbsd || openbsd
    
    package sysinfo
    
    import "syscall"
    
    func osCPUInfoName() string {
    	cpu, _ := syscall.Sysctl("machdep.cpu.brand_string")
    	return cpu
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:42:42 UTC 2024
    - 344 bytes
    - Viewed (0)
  5. src/internal/sysinfo/sysinfo.go

    package sysinfo
    
    import (
    	"internal/cpu"
    	"sync"
    )
    
    var CPUName = sync.OnceValue(func() string {
    	if name := cpu.Name(); name != "" {
    		return name
    	}
    
    	if name := osCPUInfoName(); name != "" {
    		return name
    	}
    
    	return ""
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:42:42 UTC 2024
    - 518 bytes
    - Viewed (0)
  6. src/internal/sysinfo/cpuinfo_linux.go

    	if err != nil {
    		return err
    	}
    	defer f.Close()
    
    	_, err = io.ReadFull(f, buf)
    	if err != nil && err != io.ErrUnexpectedEOF {
    		return err
    	}
    
    	return nil
    }
    
    func osCPUInfoName() string {
    	modelName := ""
    	cpuMHz := ""
    
    	// The 512-byte buffer is enough to hold the contents of CPU0
    	buf := make([]byte, 512)
    	err := readLinuxProcCPUInfo(buf)
    	if err != nil {
    		return ""
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:42:42 UTC 2024
    - 1.4K bytes
    - Viewed (0)
Back to top