Skip to content

Instantly share code, notes, and snippets.

@yutakahashi114
Last active March 26, 2021 12:29
Show Gist options
  • Save yutakahashi114/7427ce68d409b4fe9ff9145d3eea4c46 to your computer and use it in GitHub Desktop.
Save yutakahashi114/7427ce68d409b4fe9ff9145d3eea4c46 to your computer and use it in GitHub Desktop.
func bulkInsert(db xorm.Interface, us users) error {
_, err := BulkInsert(db, us)
return err
}
func Benchmark_bulkInsert_1(b *testing.B) {
base(b, 1, bulkInsert)
}
func Benchmark_bulkInsert_10(b *testing.B) {
base(b, 10, bulkInsert)
}
func Benchmark_bulkInsert_100(b *testing.B) {
base(b, 100, bulkInsert)
}
func Benchmark_bulkInsert_1000(b *testing.B) {
base(b, 1000, bulkInsert)
}
func Benchmark_bulkInsert_10000(b *testing.B) {
base(b, 10000, bulkInsert)
}
func Benchmark_bulkInsert_100000(b *testing.B) {
base(b, 100000, bulkInsert)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment