Skip to content

Commit

Permalink
[stat] Disables exp-decay sample operations
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyanliu authored and Jack47 committed Dec 20, 2017
1 parent 578a25e commit f6b3b70
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/model/statistics.go
Original file line number Diff line number Diff line change
Expand Up @@ -1306,13 +1306,14 @@ func (ps *PipelineStatistics) pluginThroughputRate(pluginName string, slot map[s
}

func (ps *PipelineStatistics) updatePipelineExecution(duration time.Duration) error {
/* FIXME(zhiyan): Disable the operations on exp-decay sample due to memory usage and lock cost issues, will back soon.
ps.pipelineExecutionSample.Update(int64(duration)) // safe conversion
// so don't call DeletePipelineExecutionSampleUpdatedCallback() in the callback
for _, callback := range ps.pipelineExecutionSampleUpdatedCallbacks.GetCallbacks() {
go callback.Callback().(pipelines.PipelineExecutionSampleUpdated)(ps.pipelineName, ps)
}

*/
ps.pipelineThroughputRates1.Update(1)
ps.pipelineThroughputRates5.Update(1)
ps.pipelineThroughputRates15.Update(1)
Expand All @@ -1332,6 +1333,7 @@ func (ps *PipelineStatistics) updatePluginExecution(pluginName string,
return fmt.Errorf("only supports update plugin success and failure statistics kinds")
}

/* FIXME(zhiyan): Disable the operations on exp-decay sample due to memory usage and lock cost issues, will back soon.
err := func() error {
ps.RLock()
defer ps.RUnlock()
Expand Down Expand Up @@ -1378,8 +1380,9 @@ func (ps *PipelineStatistics) updatePluginExecution(pluginName string,
go callback.Callback().(pipelines.PluginExecutionSampleUpdated)(pluginName, ps,
pipelines.AllStatistics)
}
*/

err = func() error {
err := func() error {
ps.RLock()
defer ps.RUnlock()

Expand Down

0 comments on commit f6b3b70

Please sign in to comment.