mirror of
https://github.com/Oxalide/vsphere-influxdb-go.git
synced 2023-10-10 13:36:51 +02:00
print version if -debug is present
This commit is contained in:
parent
b2da326242
commit
a2b027825c
@ -150,6 +150,13 @@ func (vcenter *VCenter) Init(config Configuration) error {
|
||||
|
||||
client := vcenter.client
|
||||
|
||||
// Print version
|
||||
if debug {
|
||||
aboutInfo := client.Client.ServiceContent.About
|
||||
stdlog.Println("Version:", aboutInfo.FullName)
|
||||
}
|
||||
|
||||
|
||||
var perfmanager mo.PerformanceManager
|
||||
err := client.RetrieveOne(ctx, *client.ServiceContent.PerfManager, nil, &perfmanager)
|
||||
if err != nil {
|
||||
@ -753,7 +760,6 @@ func min(n ...int64) int64 {
|
||||
}
|
||||
return min
|
||||
}
|
||||
|
||||
func max(n ...int64) int64 {
|
||||
var max int64 = -1
|
||||
for _, i := range n {
|
||||
@ -804,7 +810,6 @@ func worker(id int, config Configuration, influxDBClient influxclient.Client, no
|
||||
results <- true
|
||||
continue
|
||||
}
|
||||
|
||||
if err := vcenter.Init(config); err == nil {
|
||||
vcenter.Query(config, influxDBClient, nowTime)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user