From c144fa39cd752566a0fb605bdabc54636be781de Mon Sep 17 00:00:00 2001 From: surunzi Date: Wed, 7 Feb 2018 00:17:32 +0800 Subject: [PATCH] Add: Load benchmark plugin snippet --- README.md | 1 + src/Snippets/defSnippets.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index afd3639..91d999c 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ It is possible to enhance Eruda with more features by writing plugins. Check sou * [eruda-timing](https://github.com/liriliri/eruda-timing): Show performance and resource timing. * [eruda-memory](https://github.com/liriliri/eruda-memory): Display page memory info. * [eruda-code](https://github.com/liriliri/eruda-code): Run JavaScript code. +* [eruda-benchmark](https://github.com/liriliri/eruda-benchmark): Run JavaScript benchmarks. When writing plugins, you can use utilities exposed by Eruda, see [docs](doc/UTIL_API.md) here. diff --git a/src/Snippets/defSnippets.js b/src/Snippets/defSnippets.js index 8af909d..bab2e6a 100644 --- a/src/Snippets/defSnippets.js +++ b/src/Snippets/defSnippets.js @@ -104,6 +104,14 @@ export default [ }, desc: 'Edit and run JavaScript' }, + { + name: 'Load Benchmark Plugin', + fn() + { + loadPlugin('benchmark'); + }, + desc: 'Run JavaScript benchmarks' + }, { name: 'Restore Settings', fn() @@ -202,5 +210,6 @@ let pluginVersion = { features: '1.0.2', timing: '1.1.1', memory: '1.0.1', - code: '1.0.0' + code: '1.0.0', + benchmark: '1.0.0' };