Fix misspelling of instantiate participles (#1759)

This commit is contained in:
Sean Kelly 2022-09-27 08:13:43 -07:00 committed by GitHub
parent d4a7288826
commit 568eb1d4e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 14 deletions

View file

@ -173,7 +173,7 @@ func FormatPrometheusMetric(url string, formatType string) ([]byte, error) {
if _, ok := buckets_stats[name]; !ok {
buckets_stats[name] = make(map[string]int)
}
buckets_stats[name]["instanciation"] += ival
buckets_stats[name]["instantiation"] += ival
case "cs_buckets":
if _, ok := buckets_stats[name]; !ok {
buckets_stats[name] = make(map[string]int)
@ -296,7 +296,7 @@ func FormatPrometheusMetric(url string, formatType string) ([]byte, error) {
}
bucketsTable := tablewriter.NewWriter(ret)
bucketsTable.SetHeader([]string{"Bucket", "Current Count", "Overflows", "Instantiated", "Poured", "Expired"})
keys = []string{"curr_count", "overflow", "instanciation", "pour", "underflow"}
keys = []string{"curr_count", "overflow", "instantiation", "pour", "underflow"}
if err := metricsToTable(bucketsTable, buckets_stats, keys); err != nil {
log.Warningf("while collecting acquis stats : %s", err)
}

View file

@ -432,7 +432,7 @@ func GetParserMetric(url string, itemName string) map[string]map[string]int {
func GetScenarioMetric(url string, itemName string) map[string]int {
stats := make(map[string]int)
stats["instanciation"] = 0
stats["instantiation"] = 0
stats["curr_count"] = 0
stats["overflow"] = 0
stats["pour"] = 0
@ -467,7 +467,7 @@ func GetScenarioMetric(url string, itemName string) map[string]int {
switch fam.Name {
case "cs_bucket_created_total":
stats["instanciation"] += ival
stats["instantiation"] += ival
case "cs_buckets":
stats["curr_count"] += ival
case "cs_bucket_overflowed_total":
@ -544,12 +544,12 @@ func GetPrometheusMetric(url string) []*prom2json.Family {
}
func ShowScenarioMetric(itemName string, metrics map[string]int) {
if metrics["instanciation"] == 0 {
if metrics["instantiation"] == 0 {
return
}
table := tablewriter.NewWriter(os.Stdout)
table.SetHeader([]string{"Current Count", "Overflows", "Instanciated", "Poured", "Expired"})
table.Append([]string{fmt.Sprintf("%d", metrics["curr_count"]), fmt.Sprintf("%d", metrics["overflow"]), fmt.Sprintf("%d", metrics["instanciation"]), fmt.Sprintf("%d", metrics["pour"]), fmt.Sprintf("%d", metrics["underflow"])})
table.SetHeader([]string{"Current Count", "Overflows", "Instantiated", "Poured", "Expired"})
table.Append([]string{fmt.Sprintf("%d", metrics["curr_count"]), fmt.Sprintf("%d", metrics["overflow"]), fmt.Sprintf("%d", metrics["instantiation"]), fmt.Sprintf("%d", metrics["pour"]), fmt.Sprintf("%d", metrics["underflow"])})
fmt.Printf(" - (Scenario) %s: \n", itemName)
table.Render()

View file

@ -158,7 +158,7 @@ func registerPrometheus(config *csconfig.PrometheusCfg) {
log.Infof("Loading aggregated prometheus collectors")
prometheus.MustRegister(globalParserHits, globalParserHitsOk, globalParserHitsKo,
globalCsInfo, globalParsingHistogram, globalPourHistogram,
leaky.BucketsUnderflow, leaky.BucketsCanceled, leaky.BucketsInstanciation, leaky.BucketsOverflow,
leaky.BucketsUnderflow, leaky.BucketsCanceled, leaky.BucketsInstantiation, leaky.BucketsOverflow,
v1.LapiRouteHits,
leaky.BucketsCurrentCount)
} else {
@ -167,7 +167,7 @@ func registerPrometheus(config *csconfig.PrometheusCfg) {
parser.NodesHits, parser.NodesHitsOk, parser.NodesHitsKo,
globalCsInfo, globalParsingHistogram, globalPourHistogram,
v1.LapiRouteHits, v1.LapiMachineHits, v1.LapiBouncerHits, v1.LapiNilDecisions, v1.LapiNonNilDecisions, v1.LapiResponseTime,
leaky.BucketsPour, leaky.BucketsUnderflow, leaky.BucketsCanceled, leaky.BucketsInstanciation, leaky.BucketsOverflow, leaky.BucketsCurrentCount,
leaky.BucketsPour, leaky.BucketsUnderflow, leaky.BucketsCanceled, leaky.BucketsInstantiation, leaky.BucketsOverflow, leaky.BucketsCurrentCount,
globalActiveDecisions, globalAlerts)
}

View file

@ -104,10 +104,10 @@ var BucketsUnderflow = prometheus.NewCounterVec(
[]string{"name"},
)
var BucketsInstanciation = prometheus.NewCounterVec(
var BucketsInstantiation = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "cs_bucket_created_total",
Help: "Total buckets were instanciated.",
Help: "Total buckets were instantiated.",
},
[]string{"name"},
)
@ -151,7 +151,7 @@ func FromFactory(bucketFactory BucketFactory) *Leaky {
} else {
limiter = rate.NewLimiter(rate.Every(bucketFactory.leakspeed), bucketFactory.Capacity)
}
BucketsInstanciation.With(prometheus.Labels{"name": bucketFactory.Name}).Inc()
BucketsInstantiation.With(prometheus.Labels{"name": bucketFactory.Name}).Inc()
//create the leaky bucket per se
l := &Leaky{

View file

@ -67,7 +67,7 @@ type BucketFactory struct {
output bool //??
ScenarioVersion string `yaml:"version,omitempty"`
hash string `yaml:"-"`
Simulated bool `yaml:"simulated"` //Set to true if the scenario instanciating the bucket was in the exclusion list
Simulated bool `yaml:"simulated"` //Set to true if the scenario instantiating the bucket was in the exclusion list
tomb *tomb.Tomb `yaml:"-"`
wgPour *sync.WaitGroup `yaml:"-"`
wgDumpState *sync.WaitGroup `yaml:"-"`

View file

@ -46,7 +46,7 @@ func TimeMachinePour(l *Leaky, msg types.Event) {
func NewTimeMachine(g BucketFactory) *Leaky {
l := NewLeaky(g)
g.logger.Tracef("Instanciating timeMachine bucket")
g.logger.Tracef("Instantiating timeMachine bucket")
l.Pour = TimeMachinePour
l.Mode = TIMEMACHINE
return l