gupta.go 464 B

1234567891011121314151617181920212223242526
  1. package gupta
  2. import (
  3. "fmt"
  4. )
  5. func Hello() string {
  6. return "Hello, world"
  7. }
  8. func Run(load, cpu, memory bool, partition, networkInterface string) (cpuLoad, cpuUsage, memoryUsage float64) {
  9. cpuLoad = 0.2
  10. cpuUsage = 0.2
  11. memoryUsage = 70.0
  12. return cpuLoad, cpuUsage, memoryUsage
  13. }
  14. type GuptaReport struct {
  15. cpuLoad float64
  16. cpuUsage float64
  17. memoryUsage float64
  18. }
  19. func (g *GuptaReport) GetCPULoad() string {
  20. return fmt.Sprintf("%.2f", g.cpuLoad)
  21. }