File: memtest.py

package info (click to toggle)
pymssql 2.1.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 952 kB
  • sloc: python: 2,872; sh: 240; makefile: 148; ansic: 7
file content (13 lines) | stat: -rwxr-xr-x 417 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/python
import _mssql

test_str = 'testing' * 1000

for i in xrange(0, 1000):
    cnx = _mssql.connect('ukplcdbtest01', 'sa', 'deter101', charset='cp1252')
    cnx.select_db('tempdb')
    proc = cnx.init_procedure('pymssqlTestVarchar')
    proc.bind(test_str, _mssql.SQLVARCHAR, '@ivarchar')
    proc.bind(None, _mssql.SQLVARCHAR, '@ovarchar', output=True)
    return_value = proc.execute()
    cnx.close()