storage/postgreskv: monitor calls to sql.Next
Change-Id: I32c0c92b347a6d1cadfeb69117de58f4d9b41ad2
This commit is contained in:
parent
28a886f399
commit
f03b23d2dc
@ -71,7 +71,14 @@ func (opi *orderedCockroachIterator) Next(ctx context.Context, item *storage.Lis
|
||||
defer mon.Task()(&ctx)(nil)
|
||||
|
||||
for {
|
||||
for !opi.curRows.Next() {
|
||||
for {
|
||||
nextTask := mon.TaskNamed("check_next_row")(nil)
|
||||
next := opi.curRows.Next()
|
||||
nextTask(nil)
|
||||
if next {
|
||||
break
|
||||
}
|
||||
|
||||
result := func() bool {
|
||||
defer mon.TaskNamed("acquire_new_query")(nil)(nil)
|
||||
|
||||
|
@ -71,7 +71,14 @@ func (opi *orderedPostgresIterator) Next(ctx context.Context, item *storage.List
|
||||
defer mon.Task()(&ctx)(nil)
|
||||
|
||||
for {
|
||||
for !opi.curRows.Next() {
|
||||
for {
|
||||
nextTask := mon.TaskNamed("check_next_row")(nil)
|
||||
next := opi.curRows.Next()
|
||||
nextTask(nil)
|
||||
if next {
|
||||
break
|
||||
}
|
||||
|
||||
result := func() bool {
|
||||
defer mon.TaskNamed("acquire_new_query")(nil)(nil)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user