Skip to content

Commit c3329d0

Browse files
committed
added vbench for write csv
1 parent 077c290 commit c3329d0

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

vb_suite/io.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,20 @@
2121
read_csv_standard = Benchmark("read_csv('__test__.csv')", setup,
2222
start_date=datetime(2011, 9, 15))
2323

24+
25+
#----------------------------------------------------------------------
26+
# write_csv
27+
28+
setup = common_setup + """
29+
index = [rands(10) for _ in xrange(10000)]
30+
df = DataFrame({'float1' : randn(10000),
31+
'float2' : randn(10000),
32+
'string1' : ['foo'] * 10000,
33+
'bool1' : [True] * 10000,
34+
'int1' : np.random.randint(0, 100000, size=10000)},
35+
index=index)
36+
"""
37+
38+
write_csv_standard = Benchmark("df.to_csv('__test__.csv')", setup,
39+
start_date=datetime(2011, 9, 15))
40+

vb_suite/suite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
for bm in benchmarks:
2121
assert(bm.name is not None)
2222

23-
REPO_PATH = '/home/wesm/code/pandas'
24-
REPO_URL = 'git@github.com:wesm/pandas.git'
25-
DB_PATH = '/home/wesm/code/pandas/vb_suite/benchmarks.db'
26-
TMP_DIR = '/home/wesm/tmp/vb_pandas'
23+
REPO_PATH = '/home/adam/code/pandas'
24+
REPO_URL = 'git@github.com:adamklein/pandas.git'
25+
DB_PATH = '/home/adam/code/pandas/vb_suite/benchmarks.db'
26+
TMP_DIR = '/home/adam/tmp/vb_pandas'
2727
PREPARE = """
2828
python setup.py clean
2929
"""

vb_suite/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from vbench.git import GitRepo
77

88

9-
REPO_PATH = '/home/wesm/code/pandas'
9+
REPO_PATH = '/home/adam/code/pandas'
1010
repo = GitRepo(REPO_PATH)
1111

1212
con = sqlite3.connect('gb_suite/benchmarks.db')

0 commit comments

Comments
 (0)