jruby-startup 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7eb93d24d3b90eb28f1ada58393a3b5dcac9f5d69253a287b1abcf6241985ce
4
- data.tar.gz: 02cfb170c0583e26eaf5a121adca19a42cc6bc92279f7ebe3befe6db83ad88f1
3
+ metadata.gz: 5d586ea3e5aaf44474a4360c6fe525da30cef4c6e8983fd4041ec3cedf28879b
4
+ data.tar.gz: 9f68dc24a9b1ee72ed20242a69f7523ae9aa5c0d9e311e32d9cf87a4c13db29d
5
5
  SHA512:
6
- metadata.gz: a59b8bec8a5c0e7f68b0b47ef31af83474155a7831fa5fb5e2803763621e079ccf76b8817a6de7e5adad6afdfc12dd1ff31e67ba8b319ca17657dffbad4e7297
7
- data.tar.gz: ca41a4d37fc5e3a6c643ae0c97cc32db4075aeaa153eb703d9144035ee36a06724d409d7b4957f5e941f91e9d48c4c87bae8fe307219c8cb69e7b02011807d14
6
+ metadata.gz: 0c737f3446f4a62b90e8bc8db79e90d07859bd0f5e7a3dbb5545c6eddf6b718a0e41348f7641c5e1e0df069e75e56468576e96027ad63c6831c22af63ed8dad0
7
+ data.tar.gz: '030659741bf3725679bfde76c9599159b8301eece558c617458664a3e51bf79bae49d826b3f54104c556d01b46a1e2ca6ff0104ae8b5f964bee94d2e4b32248f'
data/README.md CHANGED
@@ -1,35 +1,39 @@
1
- # Jruby::Startup
1
+ # JRuby::Startup
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/jruby/startup`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This is a collection of utilities to help improve the startup time of
4
+ JRuby-based applications.
6
5
 
7
6
  ## Installation
8
7
 
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'jruby-startup'
13
- ```
14
-
15
- And then execute:
8
+ `gem install jruby-startup`
16
9
 
17
- $ bundle
10
+ ## Usage
18
11
 
19
- Or install it yourself as:
12
+ The utilities provided by this gem are described below.
20
13
 
21
- $ gem install jruby-startup
14
+ ### generate-appcds
22
15
 
23
- ## Usage
16
+ The `generate-appcds` command is used to generate an AppCDS, or
17
+ "Application-specific Class Data Store" archive on OpenJDK 11 or
18
+ higher. This archive pre-processes the classes in JRuby to eliminate
19
+ some overhead at startup.
24
20
 
25
- TODO: Write usage instructions here
21
+ By using this utility and setting some environment variables, many
22
+ JRuby commands can be sped up a fair amount.
26
23
 
27
- ## Development
24
+ Running `generate-appcds` alone will generate the AppCDS archive based
25
+ on a command line of `-e 1` as passed to JRuby. You can provide a
26
+ different command line, in quotes, to the `generate-appcds` command.
28
27
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
+ ```
29
+ $ generate-appcds
30
+ *** Outputting list of classes at /Users/headius/projects/jruby/lib/jruby.list
31
+ ...
32
+ ```
30
33
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
34
+ When the command has completed, you will see some environment variables
35
+ to set that will enable the use of the AppCDS archive.
32
36
 
33
37
  ## Contributing
34
38
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/headius/jruby-startup.
39
+ Bug reports and pull requests are welcome on GitHub at https://github.com/jruby/jruby-startup.
@@ -7,6 +7,10 @@ module JRuby::Startup::AppCDS
7
7
  puts "*** Warning: this feature is only supported on Java 11 or higher"
8
8
  end
9
9
 
10
+ if JRUBY_VERSION < '9.2.1.0'
11
+ puts "*** JRuby 9.2.1 or higher recommended"
12
+ end
13
+
10
14
  # Go for it
11
15
  command_line = argv[0] || "-e 1"
12
16
  jruby_home = ENV_JAVA['jruby.home']
@@ -27,7 +31,7 @@ module JRuby::Startup::AppCDS
27
31
  # Use class list to generate AppCDS archive
28
32
  puts "*** Generating shared AppCDS archive at #{jruby_jsa}"
29
33
 
30
- fail unless system "VERIFY_JRUBY=1 JAVA_OPTS='-Xshare:dump -XX:+UnlockDiagnosticVMOptions -XX:SharedClassListFile=#{jruby_list} -XX:SharedArchiveFile=#{jruby_jsa}' #{jruby_exe} #{command_line}"
34
+ fail unless system "VERIFY_JRUBY=1 JAVA_OPTS='-Xshare:dump -XX:G1HeapRegionSize=2m -XX:+UnlockDiagnosticVMOptions -XX:SharedClassListFile=#{jruby_list} -XX:SharedArchiveFile=#{jruby_jsa}' #{jruby_exe} #{command_line}"
31
35
 
32
36
  # Display env vars to use for the new archive
33
37
  puts <<~END
@@ -35,8 +39,8 @@ module JRuby::Startup::AppCDS
35
39
 
36
40
  Set the following environment variables to use the shared archive:
37
41
 
38
- VERIFY_JRUBY=1
39
- JAVA_OPTS="-XX:-VerifySharedSpaces -XX:SharedArchiveFile=#{jruby_jsa}"
42
+ VERIFY_JRUBY=1 # Only for JRuby versions 9.2.0.0 or earlier
43
+ JAVA_OPTS="-XX:G1HeapRegionSize=2m -XX:SharedArchiveFile=#{jruby_jsa}"
40
44
  END
41
45
  end
42
46
  end
@@ -1,5 +1,5 @@
1
1
  module JRuby
2
2
  module Startup
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby-startup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Oliver Nutter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-12 00:00:00.000000000 Z
11
+ date: 2018-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement