Skip to content

Commit

Permalink
Automatic Travis documentation build
Browse files Browse the repository at this point in the history
Move benchmarks to an inner crate

That's because there are following requirements:
* Tests should work for pre-1.26 and post-1.26 Rust alike;
* Benchmarks depend on 128-bit integer support from Rand.

The issue is that Rand 0.5 supports that via Cargo feature flag, not
`rustc` version detection and `cfg`-dependent feature selection doesn't
work: <rust-lang/cargo#2524>.

A solution is to have a crate just for benchmarking. The directory
structure looks like this because there are plans to use Criterion for
benchmarking on stable and beta Rusts.
  • Loading branch information
Travis CI User committed Nov 11, 2018
1 parent 9cf2674 commit 0e83c60
Show file tree
Hide file tree
Showing 162 changed files with 750 additions and 497 deletions.
36 changes: 36 additions & 0 deletions master/aliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ ALIASES['aho_corasick'] = {};
ALIASES['aho_corasick'] = {};
ALIASES['aho_corasick'] = {};
ALIASES['aho_corasick'] = {};
ALIASES['aho_corasick'] = {};
ALIASES['atty'] = {};
ALIASES['atty'] = {};
ALIASES['atty'] = {};
ALIASES['atty'] = {};
Expand All @@ -14,11 +16,14 @@ ALIASES['backtrace'] = {};
ALIASES['backtrace'] = {};
ALIASES['backtrace'] = {};
ALIASES['backtrace'] = {};
ALIASES['backtrace'] = {};
ALIASES['backtrace_sys'] = {};
ALIASES['backtrace_sys'] = {};
ALIASES['backtrace_sys'] = {};
ALIASES['backtrace_sys'] = {};
ALIASES['backtrace_sys'] = {};
ALIASES['backtrace_sys'] = {};
ALIASES['byteorder'] = {};
ALIASES['byteorder'] = {};
ALIASES['byteorder'] = {};
ALIASES['byteorder'] = {};
Expand All @@ -29,6 +34,8 @@ ALIASES['cfg_if'] = {};
ALIASES['cfg_if'] = {};
ALIASES['cfg_if'] = {};
ALIASES['cfg_if'] = {};
ALIASES['cfg_if'] = {};
ALIASES['env_logger'] = {};
ALIASES['env_logger'] = {};
ALIASES['env_logger'] = {};
ALIASES['env_logger'] = {};
Expand All @@ -39,6 +46,7 @@ ALIASES['error_chain'] = {};
ALIASES['error_chain'] = {};
ALIASES['error_chain'] = {};
ALIASES['error_chain'] = {};
ALIASES['error_chain'] = {};
ALIASES['extprim'] = {};
ALIASES['extprim'] = {};
ALIASES['extprim'] = {};
Expand All @@ -47,11 +55,14 @@ ALIASES['humantime'] = {};
ALIASES['humantime'] = {};
ALIASES['humantime'] = {};
ALIASES['humantime'] = {};
ALIASES['humantime'] = {};
ALIASES['lazy_static'] = {};
ALIASES['lazy_static'] = {};
ALIASES['lazy_static'] = {};
ALIASES['lazy_static'] = {};
ALIASES['lazy_static'] = {};
ALIASES['lazy_static'] = {};
ALIASES['libc'] = {};
ALIASES['libc'] = {};
ALIASES['libc'] = {};
ALIASES['libc'] = {};
Expand All @@ -62,11 +73,14 @@ ALIASES['log'] = {};
ALIASES['log'] = {};
ALIASES['log'] = {};
ALIASES['log'] = {};
ALIASES['log'] = {};
ALIASES['memchr'] = {};
ALIASES['memchr'] = {};
ALIASES['memchr'] = {};
ALIASES['memchr'] = {};
ALIASES['memchr'] = {};
ALIASES['memchr'] = {};
ALIASES['num_traits'] = {};
ALIASES['num_traits'] = {};
ALIASES['num_traits'] = {};
ALIASES['num_traits'] = {};
Expand All @@ -77,6 +91,8 @@ ALIASES['proc_macro2'] = {};
ALIASES['proc_macro2'] = {};
ALIASES['proc_macro2'] = {};
ALIASES['proc_macro2'] = {};
ALIASES['proc_macro2'] = {};
ALIASES['quick_error'] = {};
ALIASES['quick_error'] = {};
ALIASES['quick_error'] = {};
ALIASES['quick_error'] = {};
Expand All @@ -88,6 +104,8 @@ ALIASES['quickcheck'] = {};
ALIASES['quickcheck'] = {};
ALIASES['quickcheck'] = {};
ALIASES['quickcheck'] = {};
ALIASES['quickcheck'] = {};
ALIASES['quote'] = {};
ALIASES['quote'] = {};
ALIASES['quote'] = {};
ALIASES['quote'] = {};
Expand All @@ -99,6 +117,9 @@ ALIASES['rand'] = {};
ALIASES['rand'] = {};
ALIASES['rand'] = {};
ALIASES['rand'] = {};
ALIASES['rand'] = {};
ALIASES['rand_core'] = {};
ALIASES['rand_core'] = {};
ALIASES['rand_core'] = {};
ALIASES['rand_core'] = {};
ALIASES['rand_core'] = {};
Expand All @@ -108,6 +129,8 @@ ALIASES['regex'] = {};
ALIASES['regex'] = {};
ALIASES['regex'] = {};
ALIASES['regex'] = {};
ALIASES['regex'] = {};
ALIASES['regex_syntax'] = {};
ALIASES['regex_syntax'] = {};
ALIASES['regex_syntax'] = {};
ALIASES['regex_syntax'] = {};
Expand All @@ -118,6 +141,8 @@ ALIASES['rustc_demangle'] = {};
ALIASES['rustc_demangle'] = {};
ALIASES['rustc_demangle'] = {};
ALIASES['rustc_demangle'] = {};
ALIASES['rustc_demangle'] = {};
ALIASES['serde'] = {};
ALIASES['serde'] = {};
ALIASES['serde'] = {};
ALIASES['serde'] = {};
Expand All @@ -128,6 +153,8 @@ ALIASES['serde_bytes'] = {};
ALIASES['serde_bytes'] = {};
ALIASES['serde_bytes'] = {};
ALIASES['serde_bytes'] = {};
ALIASES['serde_bytes'] = {};
ALIASES['serde_derive'] = {};
ALIASES['serde_derive'] = {};
ALIASES['serde_derive'] = {};
ALIASES['serde_derive'] = {};
Expand All @@ -144,6 +171,8 @@ ALIASES['serde_mtproto'] = {};
ALIASES['serde_mtproto'] = {};
ALIASES['serde_mtproto'] = {};
ALIASES['serde_mtproto'] = {};
ALIASES['serde_mtproto'] = {};
ALIASES['serde_mtproto_derive'] = {};
ALIASES['serde_mtproto_derive'] = {};
ALIASES['serde_mtproto_derive'] = {};
ALIASES['serde_mtproto_derive'] = {};
Expand All @@ -164,6 +193,9 @@ ALIASES['syn'] = {};
ALIASES['syn'] = {};
ALIASES['syn'] = {};
ALIASES['syn'] = {};
ALIASES['syn'] = {};
ALIASES['syn'] = {};
ALIASES['termcolor'] = {};
ALIASES['termcolor'] = {};
ALIASES['termcolor'] = {};
ALIASES['termcolor'] = {};
Expand All @@ -174,6 +206,8 @@ ALIASES['thread_local'] = {};
ALIASES['thread_local'] = {};
ALIASES['thread_local'] = {};
ALIASES['thread_local'] = {};
ALIASES['thread_local'] = {};
ALIASES['ucd_util'] = {};
ALIASES['ucd_util'] = {};
ALIASES['ucd_util'] = {};
ALIASES['ucd_util'] = {};
Expand All @@ -184,6 +218,8 @@ ALIASES['unicode_xid'] = {};
ALIASES['unicode_xid'] = {};
ALIASES['unicode_xid'] = {};
ALIASES['unicode_xid'] = {};
ALIASES['unicode_xid'] = {};
ALIASES['utf8_ranges'] = {};
ALIASES['utf8_ranges'] = {};
ALIASES['utf8_ranges'] = {};
ALIASES['utf8_ranges'] = {};
Expand Down
6 changes: 3 additions & 3 deletions master/env_logger/fmt/struct.StyledValue.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions master/quickcheck/trait.RngCore.html

Large diffs are not rendered by default.

118 changes: 57 additions & 61 deletions master/rand/distributions/struct.Standard.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion master/rand/distributions/trait.Distribution.html

Large diffs are not rendered by default.

24 changes: 6 additions & 18 deletions master/rand/distributions/uniform/struct.UniformInt.html

Large diffs are not rendered by default.

22 changes: 10 additions & 12 deletions master/rand/distributions/uniform/trait.SampleUniform.html

Large diffs are not rendered by default.

24 changes: 11 additions & 13 deletions master/rand/distributions/uniform/trait.UniformSampler.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions master/rand/enum.ErrorKind.html

Large diffs are not rendered by default.

15 changes: 1 addition & 14 deletions master/rand/prng/chacha/struct.ChaChaRng.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ChaChaRng` struct in crate `rand`."><meta name="keywords" content="rust, rustlang, rust-lang, ChaChaRng"><title>rand::prng::chacha::ChaChaRng - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../rand/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk.png' alt='logo' width='100'></a><p class='location'>Struct ChaChaRng</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new_unseeded">new_unseeded</a><a href="#method.get_word_pos">get_word_pos</a><a href="#method.set_word_pos">set_word_pos</a><a href="#method.set_stream">set_stream</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-From%3CChaChaCore%3E">From&lt;ChaChaCore&gt;</a><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-CryptoRng">CryptoRng</a><a href="#impl-RngCore">RngCore</a><a href="#impl-SeedableRng">SeedableRng</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Rng">Rng</a><a href="#impl-FromEntropy">FromEntropy</a><a href="#impl-Into">Into</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-From">From</a><a href="#impl-TryFrom">TryFrom</a><a href="#impl-Borrow">Borrow</a><a href="#impl-TryInto">TryInto</a><a href="#impl-BorrowMut">BorrowMut</a><a href="#impl-Any">Any</a></div></div><p class='location'><a href='../../index.html'>rand</a>::<wbr><a href='../index.html'>prng</a>::<wbr><a href='index.html'>chacha</a></p><script>window.sidebarCurrent = {name: 'ChaChaRng', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/rand/prng/chacha.rs.html#71' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../../index.html'>rand</a>::<wbr><a href='../index.html'>prng</a>::<wbr><a href='index.html'>chacha</a>::<wbr><a class="struct" href=''>ChaChaRng</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct ChaChaRng(_);</pre></div><div class='docblock'><p>A cryptographically secure random number generator that uses the ChaCha
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ChaChaRng` struct in crate `rand`."><meta name="keywords" content="rust, rustlang, rust-lang, ChaChaRng"><title>rand::prng::chacha::ChaChaRng - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../rand/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk.png' alt='logo' width='100'></a><p class='location'>Struct ChaChaRng</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new_unseeded">new_unseeded</a><a href="#method.set_stream">set_stream</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-From%3CChaChaCore%3E">From&lt;ChaChaCore&gt;</a><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-CryptoRng">CryptoRng</a><a href="#impl-RngCore">RngCore</a><a href="#impl-SeedableRng">SeedableRng</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Rng">Rng</a><a href="#impl-FromEntropy">FromEntropy</a><a href="#impl-Into">Into</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-From">From</a><a href="#impl-TryFrom">TryFrom</a><a href="#impl-Borrow">Borrow</a><a href="#impl-TryInto">TryInto</a><a href="#impl-BorrowMut">BorrowMut</a><a href="#impl-Any">Any</a></div></div><p class='location'><a href='../../index.html'>rand</a>::<wbr><a href='../index.html'>prng</a>::<wbr><a href='index.html'>chacha</a></p><script>window.sidebarCurrent = {name: 'ChaChaRng', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/rand/prng/chacha.rs.html#71' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../../index.html'>rand</a>::<wbr><a href='../index.html'>prng</a>::<wbr><a href='index.html'>chacha</a>::<wbr><a class="struct" href=''>ChaChaRng</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct ChaChaRng(_);</pre></div><div class='docblock'><p>A cryptographically secure random number generator that uses the ChaCha
algorithm.</p>
<p>ChaCha is a stream cipher designed by Daniel J. Bernstein <sup id="fnref1"><a href="#fn1">1</a></sup>, that we use
as an RNG. It is an improved variant of the Salsa20 cipher family, which was
Expand Down Expand Up @@ -48,19 +48,6 @@ <h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<li>2917185654</li>
<li>2419978656</li>
</ul>
</div><h4 id='method.get_word_pos' class="method"><span id='get_word_pos.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.get_word_pos' class='fnname'>get_word_pos</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/prng/chacha.rs.html#145-156' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Get the offset from the start of the stream, in 32-bit words.</p>
<p>Since the generated blocks are 16 words (2<sup>4</sup>) long and the
counter is 64-bits, the offset is a 68-bit number. Sub-word offsets are
not supported, hence the result can simply be multiplied by 4 to get a
byte-offset.</p>
<p>Note: this function is currently only available when the <code>i128_support</code>
feature is enabled. In the future this will be enabled by default.</p>
</div><h4 id='method.set_word_pos' class="method"><span id='set_word_pos.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.set_word_pos' class='fnname'>set_word_pos</a>(&amp;mut self, word_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/prng/chacha.rs.html#167-177' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Set the offset from the start of the stream, in 32-bit words.</p>
<p>As with <code>get_word_pos</code>, we use a 68-bit number. Since the generator
simply cycles at the end of its period (1 ZiB), we ignore the upper
60 bits.</p>
<p>Note: this function is currently only available when the <code>i128_support</code>
feature is enabled. In the future this will be enabled by default.</p>
</div><h4 id='method.set_stream' class="method"><span id='set_stream.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.set_stream' class='fnname'>set_stream</a>(&amp;mut self, stream: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/prng/chacha.rs.html#190-205' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Set the stream number.</p>
<p>This is initialized to zero; 2<sup>64</sup> unique streams of output
are available per seed/key.</p>
Expand Down
Loading

0 comments on commit 0e83c60

Please sign in to comment.