forked from denoland/deno
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
port more ops to JSON (denoland#2809)
- Loading branch information
1 parent
79f82cf
commit 137f337
Showing
26 changed files
with
648 additions
and
1,155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,8 @@ | ||
// 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, | ||
} | ||
} | ||
} |
Oops, something went wrong.