removing underscore in variable name

This commit is contained in:
Jainin Shah 2018-02-07 16:28:43 -08:00
parent 8149587abe
commit a4516aa71a
1 changed files with 3 additions and 3 deletions

View File

@ -126,7 +126,7 @@ const (
// Below is the documnentation: // Below is the documnentation:
// https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt // https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt
// https://docs.docker.com/engine/api/v1.35/# // https://docs.docker.com/engine/api/v1.35/#
defaultCFSPeriod_us = 100000 defaultCFSPeriodUS = 100000
) )
type DockerDriver struct { type DockerDriver struct {
@ -1133,7 +1133,7 @@ func (d *DockerDriver) createContainerConfig(ctx *ExecContext, task *structs.Tas
// Calculate CPU Quota // Calculate CPU Quota
if driverConfig.CPUHardLimit { if driverConfig.CPUHardLimit {
percentTicks := float64(task.Resources.CPU) / float64(d.node.Resources.CPU) percentTicks := float64(task.Resources.CPU) / float64(d.node.Resources.CPU)
hostConfig.CPUQuota = int64(percentTicks * defaultCFSPeriod_us) hostConfig.CPUQuota = int64(percentTicks * defaultCFSPeriodUS)
} }
// Windows does not support MemorySwap/MemorySwappiness #2193 // Windows does not support MemorySwap/MemorySwappiness #2193
@ -1155,7 +1155,7 @@ func (d *DockerDriver) createContainerConfig(ctx *ExecContext, task *structs.Tas
d.logger.Printf("[DEBUG] driver.docker: using %d bytes memory for %s", hostConfig.Memory, task.Name) d.logger.Printf("[DEBUG] driver.docker: using %d bytes memory for %s", hostConfig.Memory, task.Name)
d.logger.Printf("[DEBUG] driver.docker: using %d cpu shares for %s", hostConfig.CPUShares, task.Name) d.logger.Printf("[DEBUG] driver.docker: using %d cpu shares for %s", hostConfig.CPUShares, task.Name)
if driverConfig.CPUHardLimit { if driverConfig.CPUHardLimit {
d.logger.Printf("[DEBUG] driver.docker: using %dms cpu quota and %dms cpu period for %s", hostConfig.CPUQuota, defaultCFSPeriod_us, task.Name) d.logger.Printf("[DEBUG] driver.docker: using %dms cpu quota and %dms cpu period for %s", hostConfig.CPUQuota, defaultCFSPeriodUS, task.Name)
} }
d.logger.Printf("[DEBUG] driver.docker: binding directories %#v for %s", hostConfig.Binds, task.Name) d.logger.Printf("[DEBUG] driver.docker: binding directories %#v for %s", hostConfig.Binds, task.Name)