summaryrefslogtreecommitdiff
path: root/cli/ops
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-11-11 00:22:14 +0100
committerGitHub <noreply@github.com>2022-11-11 00:22:14 +0100
commit5be8c96ae899f5944da70e1909da7e608afefafa (patch)
tree06ed9d91dcf10bf26c3dc744dc4e6ce83cceb6b6 /cli/ops
parent79aa3124a8cf7e311398d279a05d44c788c5def5 (diff)
feat: Stabilize Deno.bench() and 'deno bench' subcommand (#16485)
Diffstat (limited to 'cli/ops')
-rw-r--r--cli/ops/bench.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/cli/ops/bench.rs b/cli/ops/bench.rs
index 1c62452d4..6fc881f61 100644
--- a/cli/ops/bench.rs
+++ b/cli/ops/bench.rs
@@ -21,7 +21,6 @@ use uuid::Uuid;
pub fn init(
sender: UnboundedSender<BenchEvent>,
filter: TestFilter,
- unstable: bool,
) -> Extension {
Extension::builder()
.ops(vec![
@@ -31,36 +30,15 @@ pub fn init(
op_register_bench::decl(),
op_dispatch_bench_event::decl(),
op_bench_now::decl(),
- op_bench_check_unstable::decl(),
])
.state(move |state| {
state.put(sender.clone());
state.put(filter.clone());
- state.put(Unstable(unstable));
Ok(())
})
.build()
}
-pub struct Unstable(pub bool);
-
-fn check_unstable(state: &OpState, api_name: &str) {
- let unstable = state.borrow::<Unstable>();
-
- if !unstable.0 {
- eprintln!(
- "Unstable API '{}'. The --unstable flag must be provided.",
- api_name
- );
- std::process::exit(70);
- }
-}
-
-#[op]
-fn op_bench_check_unstable(state: &mut OpState) {
- check_unstable(state, "Deno.bench");
-}
-
#[derive(Clone)]
struct PermissionsHolder(Uuid, Permissions);