File tree 3 files changed +38
-20
lines changed
3 files changed +38
-20
lines changed Original file line number Diff line number Diff line change 8
8
"matrix" : {
9
9
"req" : {
10
10
"numpy" : [" " , null ],
11
- },
11
+ "pip+asv-bench-memray" : [" >=0.1.2" ],
12
+ "asv" : [" >=0.6.2" ]
13
+ }
12
14
},
13
15
"env_dir" : " .asv/env" ,
14
16
"results_dir" : " .asv/results" ,
15
- "html_dir" : " .asv/html" ,
17
+ "html_dir" : " .asv/html"
16
18
}
Original file line number Diff line number Diff line change 1
- from asv_samples .benchme import add_arr
2
-
3
-
4
- class TimeSuite :
5
- """
6
- Benchmark that times various operations, including custom summation of
7
- lists.
8
- """
9
-
10
- def setup (self ):
11
- self .list1 = [i for i in range (500 )]
12
- self .list2 = [i for i in range (500 , 1000 )]
13
-
14
- def time_add_arr (self ):
15
- """
16
- Time the add_arr function with two lists of numbers.
17
- """
18
- add_arr (self .list1 , self .list2 )
1
+ from asv_runner .benchmarks .mark import SkipNotImplemented
2
+
3
+ class MemrayBenchmarks :
4
+ params = [10 , int (2e4 )]
5
+
6
+ def ray_sum (self , n ):
7
+ try :
8
+ import numpy as np
9
+ except ImportError :
10
+ raise SkipNotImplemented ("Can't run without NumPy" )
11
+ self .data = np .random .rand (n )
12
+ np .sum (self .data )
Original file line number Diff line number Diff line change
1
+ [build-system ]
2
+ build-backend = " hatchling.build"
3
+ requires = [ " hatch-vcs" , " hatchling" ]
4
+
5
+ [tool .hatch .build .hooks .vcs ]
6
+ version-file = " _version.py"
7
+
8
+ [tool .hatch .build ]
9
+ include = [ " asv_samples/**/*.py" , " asv_samples/*.py" ]
10
+
11
+ [project ]
12
+ name = " asv_samples"
13
+ version = " 0.1.0"
14
+ description = " A set of asv samples"
15
+ authors = [
16
+ {
name =
" Rohit Goswami" ,
email =
" [email protected] " },
17
+ ]
18
+ license = {file = " LICENSE" }
19
+ readme = " readme.md"
20
+
21
+ [project .urls ]
22
+ repository = " https://github.com/HaoZeke/asv_samples"
You can’t perform that action at this time.
0 commit comments