Skip to content

Commit

Permalink
Add io stat for StarletOutputStream
Browse files Browse the repository at this point in the history
Signed-off-by: PengFei Li <[email protected]>
  • Loading branch information
banmoy committed Dec 26, 2024
1 parent 7e6110f commit f345b5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions be/src/fs/fs_starlet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "io/throttled_seekable_input_stream.h"
#include "service/staros_worker.h"
#include "storage/olap_common.h"
#include "util/defer_op.h"
#include "util/stopwatch.hpp"
#include "util/string_parser.hpp"

Expand Down Expand Up @@ -249,6 +250,9 @@ class StarletOutputStream : public starrocks::io::OutputStream {
}

Status close() override {
MonotonicStopWatch watch;
watch.start();
DeferOp defer([&]() { IOProfiler::add_sync(watch.elapsed_time()); });
auto stream_st = _file_ptr->stream();
if (!stream_st.ok()) {
return to_status(stream_st.status());
Expand Down

0 comments on commit f345b5e

Please sign in to comment.