func GenerateDataRows(db *sql.DB) {
	for count := 0; count < config.RowCount; count++ {
		data, err := common.GenerateData()
		if err != nil {
			panic(err)
		}
		_, err = db.Exec("INSERT INTO test_raw(data) VALUES ($1);", &data)
		if err != nil {
			panic(err)
		}
	}
}
GenerateDataRows generate RowCount raw random data and insert to db
package write
import (
	"database/sql"
	"fmt"
	"github.com/cossacklabs/acra/acra-writer"
	"github.com/cossacklabs/acra/benchmarks/common"
	"github.com/cossacklabs/acra/benchmarks/config"
	"github.com/cossacklabs/acra/utils"
	"github.com/cossacklabs/themis/gothemis/keys"
	"os"
)
func CheckOneKey() {
	keysPath := []string{
		"src/github.com/cossacklabs/acra/benchmarks/.acrakeys/onekey",
		"src/github.com/cossacklabs/acra/benchmarks/.acrakeys/onekey.pub",
		"src/github.com/cossacklabs/acra/benchmarks/.acrakeys/onekey_server",
		"src/github.com/cossacklabs/acra/benchmarks/.acrakeys/onekey_server.pub",
		"src/github.com/cossacklabs/acra/benchmarks/.acrakeys/onekey_storage",
		"src/github.com/cossacklabs/acra/benchmarks/.acrakeys/onekey_storage.pub",
	}
	for _, key := range keysPath {
		exists, err := utils.FileExists(key)
		if err != nil {
			panic(err)
		}
		if !exists {
			fmt.Printf("Create keypair for AcraConnector and for AcraServer that will be used in onekey test. Key %v not exists\n", key)
			os.Exit(1)
		}
	}
}
func GetPublicOneKey() *keys.PublicKey {
	publicKey, err := utils.LoadPublicKey("src/github.com/cossacklabs/acra/benchmarks/.acrakeys/onekey_storage.pub")
	if err != nil {
		panic(err)
	}
	return publicKey
}
func GenerateAcrastructRowsOneKey(publicKey *keys.PublicKey, db *sql.DB) {
	for count := 0; count < config.RowCount; count++ {
		data, err := common.GenerateData()
		if err != nil {
			panic(err)
		}
		acrastruct, err := acrawriter.CreateAcrastruct(data, publicKey, nil)
		if err != nil {
			panic(err)
		}
		_, err = db.Exec("INSERT INTO test_without_zone(data) VALUES ($1);", &acrastruct)
		if err != nil {
			panic(err)
		}
	}
}