mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 10:58:04 +08:00
comment out tests
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
use criterion::{Criterion, black_box, criterion_group, criterion_main};
|
||||
use graph_craft::util::DEMO_ART;
|
||||
fn compile_to_proto(c: &mut Criterion) {
|
||||
use graph_craft::util::{compile, load_from_name};
|
||||
use graph_craft::util::load_from_name;
|
||||
let mut c = c.benchmark_group("Compile Network cold");
|
||||
|
||||
for name in DEMO_ART {
|
||||
let network = load_from_name(name);
|
||||
c.bench_function(name, |b| b.iter_batched(|| network.clone(), |network| compile(black_box(network)), criterion::BatchSize::SmallInput));
|
||||
c.bench_function(name, |b: &mut criterion::Bencher<'_>| b.iter_batched(|| network.clone(), |mut network| black_box(network.flatten()), criterion::BatchSize::SmallInput));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ use iai_callgrind::{black_box, library_benchmark, library_benchmark_group, main}
|
||||
|
||||
#[library_benchmark]
|
||||
#[benches::with_setup(args = ["isometric-fountain", "painted-dreams", "procedural-string-lights", "parametric-dunescape", "red-dress", "valley-of-spires"], setup = load_from_name)]
|
||||
pub fn compile_to_proto(_input: NodeNetwork) {
|
||||
black_box(compile(_input));
|
||||
pub fn compile_to_proto(mut input: NodeNetwork) {
|
||||
let _ = black_box(input.flatten());
|
||||
}
|
||||
|
||||
library_benchmark_group!(name = compile_group; benchmarks = compile_to_proto);
|
||||
|
||||
@@ -672,7 +672,6 @@ impl NodeNetwork {
|
||||
}
|
||||
}
|
||||
|
||||
log::debug!("protonetwork: {:?}", protonetwork);
|
||||
Ok((ProtoNetwork::from_vec(protonetwork), value_connector_callers, protonode_callers))
|
||||
}
|
||||
|
||||
@@ -967,7 +966,7 @@ impl NodeNetwork {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ProtonodeEntry {
|
||||
Protonode(ProtoNode),
|
||||
// If deduplicated, then any upstream node which this node previously called needs to map to the new protonode
|
||||
|
||||
@@ -8,7 +8,7 @@ use std::fmt::Debug;
|
||||
use std::hash::Hash;
|
||||
use std::ops::Deref;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
#[derive(Debug, Default, Clone)]
|
||||
/// A list of [`ProtoNode`]s, which is an intermediate step between the [`crate::document::NodeNetwork`] and the `BorrowTree` containing a single flattened network.
|
||||
pub struct ProtoNetwork {
|
||||
/// A list of nodes stored in a Vec to allow for sorting.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use crate::document::NodeNetwork;
|
||||
use crate::graphene_compiler::Compiler;
|
||||
|
||||
pub fn load_network(document_string: &str) -> NodeNetwork {
|
||||
let document: serde_json::Value = serde_json::from_str(document_string).expect("Failed to parse document");
|
||||
|
||||
Reference in New Issue
Block a user