Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #447]✨ Add stats struct #448

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rocketmq-common/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub mod mix_all;
pub mod mq_version;
pub mod namesrv;
pub mod server;
pub mod stats;
pub mod sys_flag;
pub mod thread;
pub mod topic;
Expand Down
47 changes: 47 additions & 0 deletions rocketmq-common/src/common/stats.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

pub struct Stats;

impl Stats {
pub const QUEUE_PUT_NUMS: &'static str = "QUEUE_PUT_NUMS";
pub const QUEUE_PUT_SIZE: &'static str = "QUEUE_PUT_SIZE";
pub const QUEUE_GET_NUMS: &'static str = "QUEUE_GET_NUMS";
pub const QUEUE_GET_SIZE: &'static str = "QUEUE_GET_SIZE";
pub const TOPIC_PUT_NUMS: &'static str = "TOPIC_PUT_NUMS";
pub const TOPIC_PUT_SIZE: &'static str = "TOPIC_PUT_SIZE";
pub const GROUP_GET_NUMS: &'static str = "GROUP_GET_NUMS";
pub const GROUP_GET_SIZE: &'static str = "GROUP_GET_SIZE";
pub const SNDBCK_PUT_NUMS: &'static str = "SNDBCK_PUT_NUMS";
pub const BROKER_PUT_NUMS: &'static str = "BROKER_PUT_NUMS";
pub const BROKER_GET_NUMS: &'static str = "BROKER_GET_NUMS";
pub const GROUP_GET_FROM_DISK_NUMS: &'static str = "GROUP_GET_FROM_DISK_NUMS";
pub const GROUP_GET_FROM_DISK_SIZE: &'static str = "GROUP_GET_FROM_DISK_SIZE";
pub const BROKER_GET_FROM_DISK_NUMS: &'static str = "BROKER_GET_FROM_DISK_NUMS";
pub const BROKER_GET_FROM_DISK_SIZE: &'static str = "BROKER_GET_FROM_DISK_SIZE";
pub const COMMERCIAL_SEND_TIMES: &'static str = "COMMERCIAL_SEND_TIMES";
pub const COMMERCIAL_SNDBCK_TIMES: &'static str = "COMMERCIAL_SNDBCK_TIMES";
pub const COMMERCIAL_RCV_TIMES: &'static str = "COMMERCIAL_RCV_TIMES";
pub const COMMERCIAL_RCV_EPOLLS: &'static str = "COMMERCIAL_RCV_EPOLLS";
pub const COMMERCIAL_SEND_SIZE: &'static str = "COMMERCIAL_SEND_SIZE";
pub const COMMERCIAL_RCV_SIZE: &'static str = "COMMERCIAL_RCV_SIZE";
pub const COMMERCIAL_PERM_FAILURES: &'static str = "COMMERCIAL_PERM_FAILURES";

pub const GROUP_GET_FALL_SIZE: &'static str = "GROUP_GET_FALL_SIZE";
pub const GROUP_GET_FALL_TIME: &'static str = "GROUP_GET_FALL_TIME";
pub const GROUP_GET_LATENCY: &'static str = "GROUP_GET_LATENCY";
}
Loading