Commit graph

3443 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
213ea74929 hugolib: Add number of tags as a benchmark know 2017-06-01 18:51:51 +02:00
Bjørn Erik Pedersen
08a10e5d14 hubolib: Make the site benchmark output more compact
So you can do and get:

```
▶ ./benchSite.sh "YAML,num_pages=10"
Running with BenchmarkSiteBuilding/YAML,num_pages=10
BenchmarkSiteBuilding/YAML,num_pages=10-4                 1000       1611261 ns/op      730749 B/op        6458 allocs/op
PASS
ok      github.com/spf13/hugo/hugolib    8.168s
```
2017-06-01 12:00:47 +02:00
Bjørn Erik Pedersen
9fa71c945e hubolib: Add 10k pages as a benchmark variant 2017-05-31 14:48:49 +03:00
Bjørn Erik Pedersen
d25d89e653 hugolib: Increase leaktest timeout
To try to less flaky test.
2017-05-31 13:23:22 +03:00
Bjørn Erik Pedersen
8969701967 hugolib: Break early from sitemap disabled check
See #3544
2017-05-31 12:55:51 +03:00
Bjørn Erik Pedersen
69d92dc49c hugolib: Respect disableKinds=["sitemap"]
Fixes #3544
2017-05-31 10:57:19 +03:00
Bjørn Erik Pedersen
d74452cfe8 Add benchSite.sh
And change site benchmark separator to comma to make it Bash and regexp friendly, example:

./benchSite.sh "frontmatter=YAML,num_root_sections=1,num_pages=.*,tags_per_page=20,shortcodes=false,render=false"
2017-05-31 10:35:02 +03:00
Bjørn Erik Pedersen
978951cf52 vendor: Update go-toml
Slightly better:

```
benchmark                                                                                                                      old ns/op     new ns/op     delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4     204522447     200702508     -1.87%

benchmark                                                                                                                      old allocs     new allocs     delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4     1943677        1784437        -8.19%

benchmark                                                                                                                      old bytes     new bytes     delta
BenchmarkSiteBuilding/frontmatter=TOML|num_root_sections=1|num_pages=1000|tags_per_page=20|shortcodes=false|render=false-4     102665182     100925773     -1.69%
```
2017-05-30 21:39:57 +03:00
Bjørn Erik Pedersen
4aff2b6e74 source: Cache language config
```
benchmark                                                                                                                     old ns/op     new ns/op     delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4     552742744     501838152     -9.21%

benchmark                                                                                                                     old allocs     new allocs     delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4     3047393        2957378        -2.95%

benchmark                                                                                                                     old bytes     new bytes     delta
BenchmarkSiteBuilding/frontmatter=YAML|num_root_sections=1|num_pages=5000|tags_per_page=0|shortcodes=false|render=false-4     356533864     354291924     -0.63%
```
2017-05-30 19:29:55 +03:00
Bjørn Erik Pedersen
2342df4d2d hugolib: Add TOML/YAML switch to benchmark 2017-05-30 18:10:48 +03:00
Bjørn Erik Pedersen
828427ef52 hugolib: Adjust timeout for leaktest 2017-05-30 16:38:10 +03:00
Bjørn Erik Pedersen
ce624cc7d3 hugolib: Add slightly more realistic tag distribution to benchmark 2017-05-30 15:33:37 +03:00
Bjørn Erik Pedersen
8930e259d7 hugolib: Add site building benchmarks
To run a subset of these benchmark, one can do something like this:

```
go test -run="NONE" -bench="BenchmarkSiteBuilding/tags_per_page=0.*shortcodes=true.*render=false"  -test.benchmem=true ./hugolib
```

Which will run without any tags, with shortcodes, but will skip rendering.

Fixes #3535
2017-05-30 14:30:30 +03:00
Albert Nigmatzianov
710300cb76 docs: Update overview/usage 2017-05-28 12:10:16 +02:00
Bjørn Erik Pedersen
93cab620d7 Update snapcraft.yaml
Bump to latest Go version.
2017-05-28 00:38:14 +03:00
Bjørn Erik Pedersen
19de4476d8 hubolib: Remove the regular page restriction from .Site.GetPage
See #2844
2017-05-26 21:31:45 +03:00
Bryan Klein
37e378773f docs: Fix parameter name in YouTube shortcode section
Since 'autostart' is not the correct name of the parameter, I changed the words to make this section more clear.
2017-05-26 15:05:19 +03:00
Bjørn Erik Pedersen
b5b41c4468 hugolib: Refine allKindsInPages 2017-05-26 10:51:17 +03:00
Bjørn Erik Pedersen
bde807bd1e travis: Update Go versions 2017-05-26 10:49:40 +03:00
Bjørn Erik Pedersen
612f6e3afe hugolib: Fix ref/relref issue with duplicate base filenames
This commit also makes that function 80x faster.

Fixes #2507
2017-05-26 10:42:45 +03:00
Bjørn Erik Pedersen
50d11138f3 hugolib: Add a cache to GetPage
Looks to be slightly slower with the low number of section pages, but the 1000 regular pages seem to add value.

```
benchmark                     old ns/op     new ns/op     delta
BenchmarkGetPage-4            97.7          145           +48.41%
BenchmarkGetPageRegular-4     7933          161           -97.97%

benchmark                     old allocs     new allocs     delta
BenchmarkGetPage-4            0              0              +0.00%
BenchmarkGetPageRegular-4     0              0              +0.00%

benchmark                     old bytes     new bytes     delta
BenchmarkGetPage-4            0             0             +0.00%
BenchmarkGetPageRegular-4     0             0             +0.00%
```
2017-05-26 10:42:45 +03:00
Bjørn Erik Pedersen
e0c2e79820 hugolib: Support regular pages in .Site.GetPage
Fixes #2844
2017-05-26 10:42:45 +03:00
Bjørn Erik Pedersen
87203139c3 cache: Add a simple partitioned lazy cache 2017-05-26 10:42:45 +03:00
Mahmud Ridwan
a91c2705c7 docs: Add furqansoftware.com to the showcase 2017-05-25 14:32:47 +02:00
Albert Nigmatzianov
99412bfe45 docs: Delete brew update from docs
Fix #3518
2017-05-25 13:31:38 +02:00
Albert Nigmatzianov
421a46947a cmd: Replace flagChanged with pflag.FlagSet.Changed 2017-05-24 10:51:51 +02:00
Chankey Pathak
0a40cb43ea docs: Add tutswiki.com to the showcase 2017-05-23 20:39:10 +02:00
Bjørn Erik Pedersen
d460159a5f docs: Regenerate commands docs
Closes #3400
2017-05-23 21:01:51 +03:00
Bjørn Erik Pedersen
8b49c3a175 hugolib: Enable leaktest
See #3082
2017-05-23 20:40:20 +03:00
Bjørn Erik Pedersen
bcd32f1086 commands: Remove the rlimit tweaking on macOS
Fixes #3512
2017-05-23 18:52:00 +03:00
Bjørn Erik Pedersen
62fe640d09 vendor: Update libs 2017-05-23 18:02:36 +03:00
Bjørn Erik Pedersen
fbb78b89df hugolib: Speed up GetPage
When we know to look into the index pages collection, do that:

```
benchmark              old ns/op     new ns/op     delta
BenchmarkGetPage-4     51483         7072          -86.26%

benchmark              old allocs     new allocs     delta
BenchmarkGetPage-4     71             71             +0.00%

benchmark              old bytes     new bytes     delta
BenchmarkGetPage-4     2648          2648          +0.00%
```

This commit also returns an error if .Site.GetPage is called with the regular Page Kind, as that is currently not supported.

Fixes #3503
2017-05-23 15:18:26 +03:00
Bjørn Erik Pedersen
6c560288a6 hugolib: Add BenchmarkGetPage 2017-05-23 12:10:15 +03:00
Bjørn Erik Pedersen
89b85aede1 releaser: Disable flaky test 2017-05-22 23:23:52 +03:00
Cameron Moore
4113693ac1 tpl/cast: Handle template.HTML and friends in ToInt
Also add tests for ToInt and ToString.

Resolves #3308
2017-05-22 23:20:53 +03:00
Alexandros
f41f728222 Remove Unmaintaned Frontends from Tools.
The unmaintained Rango frontend and the Hugopit "experiment" should be removed from the Hugo Tools/Frontends section of the documentation as they are unusable.

Rango can mess up with other dependencies installed in the Go Path as reported here: 
https://github.com/stayradiated/rango/issues/4

Hugopit's developer himself stated that this is an unmaintained experiment and he seemed a bit surprised that it is included in Hugo's documentation over here: https://github.com/sjardim/Hugopit/issues/3
2017-05-22 20:46:18 +02:00
Bjørn Erik Pedersen
8ddc7a5cde releaser: Prepare repository for 0.22-DEV
[ci skip]
2017-05-22 16:18:26 +03:00
Bjørn Erik Pedersen
f63ee6567d releaser: Add relase notes to /docs for release of 0.21
[ci skip]
2017-05-22 16:11:22 +03:00
Bjørn Erik Pedersen
1a965e5d2f releaser: Bump versions for release of 0.21
[ci skip]
2017-05-22 16:09:42 +03:00
Bjørn Erik Pedersen
baa414ae41 releaser: Add a new step
When doing it step-by-step, we need to update the version numbers in its own step.
2017-05-22 16:04:40 +03:00
Bjørn Erik Pedersen
cdf32f08c7 releaser: Update ldflags 2017-05-22 12:27:23 +03:00
Bjørn Erik Pedersen
98e333b35c vendor: Update golang.org/x/sys/unix
To hopefully fix a broken Dragonfly build.
2017-05-22 12:27:23 +03:00
Bjørn Erik Pedersen
a00962134a releaser: Add release notes draft for 0.21
* releaser: Add relase notes draft for release of 0.21

[ci skip]
2017-05-22 10:51:11 +03:00
Bjørn Erik Pedersen
a119ef693f tpl/time: Re-add the time example 2017-05-20 11:41:43 +03:00
Bjørn Erik Pedersen
1f9e8dcc60 tpl: Make the Namespace func signature explicit
This makes it cleaner and avoids breaking client code, such as the docs helper JSON generator.
2017-05-20 11:34:38 +03:00
Bjørn Erik Pedersen
ebd636e4d5 releaser: Delay the version bumping
So we can do the release notes in its own branch if needed.
2017-05-20 11:11:23 +03:00
Bjørn Erik Pedersen
4d1989d59c releaser: Fix tag detection for changelog when doing a main release
Also improve the changelog slightly.

Fixes #3482
2017-05-20 10:58:08 +03:00
Cameron Moore
a59525b05b tpl/time: Remove asTime template func mapping 2017-05-20 00:00:20 +03:00
Cameron Moore
3954160a21 tpl/time: Support overlapping namespace and template func
Fixes #3421
2017-05-20 00:00:20 +03:00
Bjørn Erik Pedersen
93c5774dd7 tpl/collections: Make IsSet WARNING less chatty
Updates #3092
2017-05-19 21:14:37 +03:00