-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(s3stream): metrics of upload wal (#856)
Signed-off-by: Ning Yu <[email protected]>
- Loading branch information
1 parent
59716a7
commit eb69853
Showing
8 changed files
with
106 additions
and
20 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
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
66 changes: 66 additions & 0 deletions
66
s3stream/src/main/java/com/automq/stream/s3/metrics/operations/S3Stage.java
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package com.automq.stream.s3.metrics.operations; | ||
|
||
public enum S3Stage { | ||
|
||
/* Append WAL stages start */ | ||
APPEND_WAL_BEFORE(S3Operation.APPEND_STORAGE_WAL, "before"), | ||
APPEND_WAL_BLOCK_POLLED(S3Operation.APPEND_STORAGE_WAL, "block_polled"), | ||
APPEND_WAL_AWAIT(S3Operation.APPEND_STORAGE_WAL, "await"), | ||
APPEND_WAL_WRITE(S3Operation.APPEND_STORAGE_WAL, "write"), | ||
APPEND_WAL_AFTER(S3Operation.APPEND_STORAGE_WAL, "after"), | ||
APPEND_WAL_COMPLETE(S3Operation.APPEND_STORAGE_WAL, "complete"), | ||
/* Append WAL stages end */ | ||
|
||
/* Force upload WAL start */ | ||
FORCE_UPLOAD_WAL_AWAIT_INFLIGHT(S3Operation.FORCE_UPLOAD_STORAGE_WAL, "await_inflight"), | ||
FORCE_UPLOAD_WAL_COMPLETE(S3Operation.FORCE_UPLOAD_STORAGE_WAL, "complete"), | ||
/* Force upload WAL end */ | ||
|
||
/* Upload WAL start */ | ||
UPLOAD_WAL_PREPARE(S3Operation.UPLOAD_STORAGE_WAL, "prepare"), | ||
UPLOAD_WAL_UPLOAD(S3Operation.UPLOAD_STORAGE_WAL, "upload"), | ||
UPLOAD_WAL_COMMIT(S3Operation.UPLOAD_STORAGE_WAL, "commit"), | ||
UPLOAD_WAL_COMPLETE(S3Operation.UPLOAD_STORAGE_WAL, "complete"); | ||
/* Upload WAL end */ | ||
|
||
private final S3Operation operation; | ||
private final String name; | ||
|
||
S3Stage(S3Operation operation, String name) { | ||
this.operation = operation; | ||
this.name = name; | ||
} | ||
|
||
public S3Operation getOperation() { | ||
return operation; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "S3Stage{" + | ||
"operation=" + operation.getName() + | ||
", name='" + name + '\'' + | ||
'}'; | ||
} | ||
} |
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