You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: operation_test.go
    path of file: ./repos/mongo-go-driver/benchmark
    
    the code of the file until where you have to start completion: // Copyright (C) MongoDB, Inc. 2022-present.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

package benchmark

import (
	"context"
	"testing"

	"go.mongodb.org/mongo-driver/bson"
	"go.mongodb.org/mongo-driver/mongo"
	"go.mongodb.org/mongo-driver/mongo/options"
)

var teststrings = []string{
	"hello",
	"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc hendrerit nibh eu lorem scelerisque iaculis. Mauris tincidunt est quis gravida sollicitudin. Vestibulum ante dolor, semper eget finibus accumsan, finibus id nulla. Nam mauris libero, mattis sed libero at, vestibulum vehicula tellus. Nullam in finibus neque. Ut bibendum blandit condimentum. Etiam tortor mauris, tempus et accumsan a, lobortis cursus lacus.  Pellentesque fermentum gravida aliquam. Donec fermentum nisi ut venenatis convallis. Praesent ultrices, justo ac fringilla eleifend, augue libero tristique
    
func BenchmarkClientWrite(b *testing.B) {
	benchmarks := []struct {
		name string
		opt  *options.ClientOptions
	}{
		{name: "not compressed", opt: options.Client().ApplyURI("mongodb://localhost:27017")},
		{name: "snappy", opt: options.Client().ApplyURI("mongodb://localhost:27017").SetCompressors([]string{"snappy"})},
		{name: "zlib", opt: options.Client().ApplyURI("mongodb://localhost:27017").SetCompressors([]string{"zlib"})},
		{name: "zstd", opt: options.Client().ApplyURI("mongodb://localhost:27017").SetCompressors([]string{"zstd"})},
	}
	for _, bm := range benchmarks {
		b.Run(bm.name, func(b *testing.B) {
			client, err := mongo.NewClient(bm.opt)
			if err != nil {
				b.Fatalf("error creating client: %v", err)
			}
			ctx := context.Background()
			err = client.Connect(ctx)
			if err != nil {
				b.Fatalf("error connecting: %v", err)
			}
			defer func() { _ = client.Disconnect(context.Background()) }()
			coll := client.Database("test").Collection("test")
			_, err = coll.DeleteMany(context.Background(), bson.D{})
			if err != nil {
				b.Fatalf("error deleting the document: %v", err)
			}

			b.ResetTimer()
			b.RunParallel(func(p *testing.PB) {
				var cnt int
				for p.Next() {
					cnt = (cnt + 1) % len(teststrings)
					_, err = coll.InsertOne(context.Background(), bson.D{{"text", teststrings[cnt]}})
					if err != nil {
						b.Fatalf("error inserting one document: %v", err)
					}
				}
			})
			_, _ = coll.DeleteMany(context.Background(), bson.D{})
		})
	}
}