Skip to content
This repository has been archived by the owner on Aug 2, 2018. It is now read-only.

Commit

Permalink
Improve graph scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
desbma committed Feb 9, 2016
1 parent f2b2d81 commit 97bfc69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -28,12 +28,12 @@ Tests were done copying files (source and destination) on a [tmpfs](https://en.w

See [benchmark.py](https://github.com/desbma/pyfastcopy/blob/master/benchmark.py) for details about the test procedure and how the following graphs were generated.

[![Imgur](http://i.imgur.com/0TZTs4Oh.png)](http://i.imgur.com/0TZTs4O.png)
![Imgur](http://i.imgur.com/mSjKHBm.png)

[![Imgur](http://i.imgur.com/op8HxaCh.png)](http://i.imgur.com/op8HxaC.png)
![Imgur](http://i.imgur.com/GvqQhHD.png)

These tests show a 30-40% performance gain compared to stock Python shutil.copy:
[![Imgur](http://i.imgur.com/V4dIgSyh.png)](http://i.imgur.com/V4dIgSy.png)
These tests show a 30-40% performance gain compared to stock Python `shutil.copyfile`:
![Imgur](http://i.imgur.com/1eMzwH0.png)


## Usage
Expand Down
6 changes: 3 additions & 3 deletions benchmark.py
Expand Up @@ -74,7 +74,7 @@ def read_file(filepath):

# plot
for graph, data_filepath in enumerate(data_filepaths[:2], 1):
gnuplot_code = ["set terminal png size 1280,600 font 'M+ 1c bold,16'",
gnuplot_code = ["set terminal png size 1024,600 font 'M+ 1c bold,16'",
"set title \"Time to copy file using shutil.copyfile: standard Python vs pyfastcopy\\n"
"(using tmpfs, on %s %s %s)\"" % (platform.system(),
platform.release(),
Expand All @@ -96,7 +96,7 @@ def read_file(filepath):
input=gnuplot_code,
stderr=None,
universal_newlines=True)
gnuplot_code = ["set terminal png size 1280,600 font 'M+ 1c bold,16'",
gnuplot_code = ["set terminal png size 1024,600 font 'M+ 1c bold,16'",
"set title \"shutil.copyfile performance gain of: pyfastcopy vs stock Python\\n"
"(using tmpfs, on %s %s %s)\"" % (platform.system(),
platform.release(),
Expand All @@ -105,7 +105,7 @@ def read_file(filepath):
"set xlabel 'File size (MB)'",
"set xtics rotate out",
"set ylabel 'Performance gain (%)'",
"set yrange[0:100]",
"set yrange[20:50]",
"set format y '%.0f'",
"set mytics 5",
"set datafile separator ','",
Expand Down

0 comments on commit 97bfc69

Please sign in to comment.