php-sqlsrv/test/Performance/benchmark/sqlsrv/regular/SqlsrvSelectVersionBench.php

28 lines
571 B
PHP
Raw Normal View History

2017-05-06 02:32:09 +02:00
<?php
use SqlsrvPerfTest\SqlsrvUtil;
/**
* @BeforeMethods({"connect"})
* @AfterMethods({"disconnect"})
*/
class SqlsrvSelectVersionBench{
private $conn;
public function connect(){
$this->conn = SqlsrvUtil::connect();
}
/*
* Each iteration calls execDirect API to fetch @@Version
*/
public function benchSelectVersion(){
for( $i=0; $i<10; $i++ ){
$version = SqlsrvUtil::selectVersion( $this->conn );
}
2017-05-06 02:32:09 +02:00
}
public function disconnect(){
SqlsrvUtil::disconnect( $this->conn );
}
}