Skip to content

v2.0.0

Latest

Choose a tag to compare

@Tusamarco Tusamarco released this 13 Oct 15:38
d14784a

What's Changed

Restructure project layout to follow Go best practices

  • Remove src/ wrapper directory
  • Move library code to calculator/ with package renamed from
    mysqloperatorcalculator to calculator
  • Move server entry point to cmd/server/ (main.go + help.go)
  • Move example entry point to cmd/example/main.go
  • Move templates/ to root level
  • Update all import paths from src/mysqloperatorcalculator to calculator
  • Replace MO alias with direct calculator. qualifier at all call sites
  • Rename Constants.go and Configuration.go to lowercase filenames
  • Remove committed server binary and clean up .gitignore
  • Delete empty Global/ and Objects/ directories

Apply Go naming conventions across calculator package and documentation
Acronyms

  • DbType* → DBType* (DBTypePXC, DBTypeGroupReplication, DBTypeAsync)
  • ResultOutputFormatJson → ResultOutputFormatJSON
  • FamilyTypeMysql → FamilyTypeMySQL
  • MysqlOperatorCalculator → MySQLOperatorCalculator
  • Dimension.MysqlCpu / ProxyCpu / PmmCpu → MySQLCPU / ProxyCPU / PMMCPU
  • Dimension.MysqlMemory / PmmMemory → MySQLMemory / PMMMemory
  • Configuration.Mysqlversions → MySQLVersions
  • ConfigurationRequest.Mysqlversion → MySQLVersion
  • Parameter.Mysqlversions → MySQLVersions
  • CpuConncetionMillFactor* → CPUConnectionMillFactor*
  • GcacheFootPrintFactor* → GCacheFootprintFactor* (footprint is one word)
  • references.cpusPmm / memoryPmm → cpusPMM / memoryPMM
  • references.gcscache / gcscacheFootprint / gcscacheLoad
    → gcsCache / gcsCacheFootprint / gcsCacheLoad
  • references.innodbRedoLogDim → innoDBRedoLogDim

Field naming

  • Dimension.Id / LoadType.Id → ID (Go convention: ID not Id)
  • ResponseMessage.MType / MName / MText → Type / Name / Text
    (M prefix is non-idiomatic; fields are unambiguous without it)

Type rename

  • GroupObj → ParameterGroup
    (Obj suffix is Java-style; ParameterGroup is self-documenting)

Typo fixes

  • CpuConncetionMill* → CPUConnectionMill* (double-n typo)
  • GCSCacheMemoryImpactPctBuferPool → GCSCacheMemoryImpactPctBufferPool (missing f)
  • ConnectionWeighPctLimit → ConnectionWeightPctLimit (missing t)
  • paramInnoDPurgeThreads → paramInnoDBPurgeThreads (missing B)
  • paramInnoDBinnodb_parallel_read_threads → paramInnoDBParallelReadThreads
    (underscore in identifier + redundant innodb prefix)

Internal field / case fixes (references struct)

  • innoDBbpSize → innoDBBPSize (bp → BP)
  • connBuffersMemTot → connBuffersMemTotal (Tot → Total)
  • idealBufferPoolDIm → idealBufferPoolDim (DIm → Dim)

Method renames (configurator.go)

  • getInnodbRedolog → getInnoDBRedoLog
  • getRedologDimensionTot → getRedoLogDimensionTotal
  • getRedologfilesNumber → getRedoLogFilesNumber
  • getGcache / getGcacheLoad → getGCache / getGCacheLoad
  • getInnodbBufferPool → getInnoDBBufferPool
  • getInnodbParameters → getInnoDBParameters
  • getGCScache → getGCSCache

README updates

  • Import path updated: src/mysqloperatorcalculator → calculator, MO alias removed
  • All code examples updated to use new type, field, and constant names
  • Binary invocation updated: ./mysqloperatorcalculator → ./server
  • Build command updated: go build -o mysqloperatorcalculator ./src
    → go build -o server ./cmd/server
  • File reference updated: src/example/example.go → cmd/example/main.go
  • Constants file reference updated: src/mysqloperatorcalculator/Constants.go
    → calculator/constants.go
  • All stale constant names updated in tables and pipeline documentation