Skip to content

A small library for timing database interactions

License

Notifications You must be signed in to change notification settings

jonbodner/dbtimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dbtimer

A small library for timing database interactions

To use:

	dbtimer.SetTimerLoggerFunc(func(ti dbtimer.TimerInfo) {
		fmt.Printf("%s %s %v %v %d\n",ti.Method, ti.Query, ti.Args, ti.Err, ti.End.Sub(ti.Start).Nanoseconds()/1000)
	})
	db, err := sql.Open("timer", "postgres postgres://jon:jon@localhost/jon?sslmode=disable")

Then use the db as expected.

About

A small library for timing database interactions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages