You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: runtime.rs
    path of file: ./repos/zenoh-flow/zenoh-flow-daemon/src
    
    the code of the file until where you have to start completion: //
// Copyright (c) 2021 - 2023 ZettaScale Technology
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
// which is available at https://www.apache.org/licenses/LICENSE-2.0.
//
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
//
// Contributors:
//   ZettaScale Zenoh Team, <zenoh@zettascale.tech>
//

use std::{collections::HashMap, sync::Arc};

use anyhow::bail;
use flume::{Receiver, Sender};
use futures::select;
use serde::{Deserialize, Serialize};
use sysinfo::{CpuRefreshKind, MemoryRefreshKind, RefreshKind};
use zenoh::prelude::r#async::*;
use zenoh::queryable::Query;
use zenoh_flow_commons::{I
    
    pub(crate) async fn process(self, query: Query, runtime: Arc<Runtime>) {
        let payload = match self {
            RuntimesQuery::List => {
                // TODO We could probably try to generate that structure the moment we create the daemon, I don't see
                // these values changing at runtime.
                let runtime_info = RuntimeInfo {
                    id: runtime.id().clone(),
                    name: runtime.name(),
                };

                serde_json::to_vec(&runtime_info)
            }

            RuntimesQuery::Status => {
                let data_flows_status = runtime.instances_state().await;

                // TODO For better performance, we should initialise this structure once and simply refresh it whenever
                // we want to access some data about the machine.
                let system = sysinfo::System::new_with_specifics(
                    RefreshKind::new()
                        .with_memory(MemoryRefreshKind::new().with_ram())
                        .with_cpu(CpuRefreshKind::new()),
                );

                serde_json::to_vec(&RuntimeStatus {
                    name: runtime.name(),
                    cpus: system.cpus().len(),
                    ram_total: system.total_memory(),
                    data_flows_status,
                    hostname: sysinfo::System::host_name(),
                    architecture: sysinfo::System::cpu_arch(),
                    operating_system: sysinfo::System::name(),
                })
            }
        };

        let sample = match payload {
            Ok(payload) => Ok(Sample::new(query.key_expr().clone(), payload)),
            Err(e) => Err(Value::from(e.to_string())),
        };

        if let Err(e) = query.reply(sample).res().await {
            tracing::error!(
                r#"Failed to reply to query < {} >:
Caused by:
{:?}"#,
                query,
                e
            );
        }
    }