File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ group :development, :test do
2020 gem 'simplecov' , require : false , platform : :mri
2121 gem 'coveralls' , require : false , platform : :mri
2222 gem 'psych' , platforms : [ :mri , :rbx ]
23+ gem 'benchmark-ips'
2324end
2425
2526group :debug do
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ require "bundler/setup"
3+ require 'json/ld'
4+ require 'benchmark/ips'
5+
6+ source = JSON . parse %({
7+ "@context": "http://schema.org/",
8+ "@type": "SoftwareApplication",
9+ "name": "EtherSia",
10+ "description": "IPv6 library for the ENC28J60 Ethernet controller",
11+ "url": "https://github.com/njh/EtherSia",
12+ "author": {
13+ "@type": "Person",
14+ "name": "Nicholas Humfrey <njh@aelius.com>"
15+ },
16+ "applicationCategory": "Communication",
17+ "operatingSystem": "Arduino",
18+ "downloadUrl": "http://downloads.arduino.cc/libraries/njh/EtherSia-1.0.0.zip",
19+ "softwareVersion": "1.0.0",
20+ "fileSize": 77
21+ })
22+
23+
24+ Benchmark . ips do |x |
25+ x . config ( time : 10 , warmup : 1 )
26+ x . report ( 'toRdf' ) { JSON ::LD ::API . toRdf ( source ) }
27+ end
You can’t perform that action at this time.
0 commit comments