mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Revert json ops (#2814)
* Revert "port more ops to JSON (#2809)" This reverts commit137f33733d
. * Revert "port ops to JSON: compiler, errors, fetch, files (#2804)" This reverts commit79f82cf10e
. * Revert "Port rest of os ops to JSON (#2802)" This reverts commit5b2baa5c99
.
This commit is contained in:
parent
bdc0a13261
commit
2235dd795d
45 changed files with 1968 additions and 1045 deletions
14
cli/msg.rs
14
cli/msg.rs
|
@ -1,8 +1,22 @@
|
|||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
#![allow(dead_code)]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::all, clippy::pedantic))]
|
||||
use crate::state;
|
||||
use flatbuffers;
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
// GN_OUT_DIR is set either by build.rs (for the Cargo build), or by
|
||||
// build_extra/rust/run.py (for the GN+Ninja build).
|
||||
include!(concat!(env!("GN_OUT_DIR"), "/gen/cli/msg_generated.rs"));
|
||||
|
||||
impl<'a> From<&'a state::Metrics> for MetricsResArgs {
|
||||
fn from(m: &'a state::Metrics) -> Self {
|
||||
MetricsResArgs {
|
||||
ops_dispatched: m.ops_dispatched.load(Ordering::SeqCst) as u64,
|
||||
ops_completed: m.ops_completed.load(Ordering::SeqCst) as u64,
|
||||
bytes_sent_control: m.bytes_sent_control.load(Ordering::SeqCst) as u64,
|
||||
bytes_sent_data: m.bytes_sent_data.load(Ordering::SeqCst) as u64,
|
||||
bytes_received: m.bytes_received.load(Ordering::SeqCst) as u64,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue