Skip to content

Commit

Permalink
ADD new size of method.
Browse files Browse the repository at this point in the history
  • Loading branch information
karminski committed Feb 19, 2024
1 parent 132c3fb commit cbacb98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/actionruntime/postgresql/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"log"
"net/url"
"reflect"
"unsafe"

"github.com/DmitriyVTitov/size"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/mitchellh/mapstructure"
Expand Down Expand Up @@ -180,7 +180,7 @@ func RetrieveToMap(rows pgx.Rows) ([]map[string]interface{}, error) {
for i := 0; i < count; i++ {
valuePtrs[i] = &values[i]
// check valuePtrs size
valuePtrsSize := unsafe.Sizeof(valuePtrs)
valuePtrsSize := size.Of(valuePtrs)
log.Printf("[DUMP] valuePtrsSize: %d\n", valuePtrsSize)

}
Expand All @@ -206,7 +206,7 @@ func RetrieveToMap(rows pgx.Rows) ([]map[string]interface{}, error) {

tableData = append(tableData, entry)
// check tableData size
tableDataSize := unsafe.Sizeof(tableData)
tableDataSize := size.Of(tableData)
log.Printf("[DUMP] tableDataSize: %d\n", tableDataSize)
}
log.Printf("[DUMP] big loop end\n")
Expand Down

0 comments on commit cbacb98

Please sign in to comment.