aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-05-22 13:09:07 -0300
committerEuAndreh <eu@euandre.org>2025-05-22 13:09:07 -0300
commit9c561c2af5480b64352501103684292ba2970352 (patch)
tree59b7a4d8e51b2517c53b0be4882a1072e046bedb
parentsrc/stm.go: Add Atom() alias to NewVar() fn (diff)
downloadstm-9c561c2af5480b64352501103684292ba2970352.tar.gz
stm-9c561c2af5480b64352501103684292ba2970352.tar.xz
src/stm.go: Remove ad-hoc profiling code
-rw-r--r--src/stm.go11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/stm.go b/src/stm.go
index ef9e512..41359af 100644
--- a/src/stm.go
+++ b/src/stm.go
@@ -261,20 +261,12 @@ var (
tx.cond.L = &tx.mu
return tx
}}
- failedCommitsProfile *pprof.Profile
)
const (
- profileFailedCommits = false
sleepBetweenRetries = false
)
-func init() {
- if profileFailedCommits {
- failedCommitsProfile = pprof.NewProfile("stmFailedCommits")
- }
-}
-
func newTx() *Tx {
tx := txPool.Get().(*Tx)
tx.tries = 0
@@ -328,9 +320,6 @@ retry:
if tx.inputsChanged() {
tx.unlock()
expvars.Add("failed commits", 1)
- if profileFailedCommits {
- failedCommitsProfile.Add(new(int), 0)
- }
goto retry
}
// commit the write log and broadcast that variables have changed