celeborn/common
Cheng Pan a1be02b4fa [CELEBORN-757] Improve metrics method signature and code style
### What changes were proposed in this pull request?

- gauge method definition improvement. i.e.

  before
  ```
  def addGauge[T](name: String, f: Unit => T, labels: Map[String, String])
  ```
  after
  ```
  def addGauge[T](name: String, labels: Map[String, String])(f: () => T)
  ```
  which improves the caller-side code style
  ```
  addGauge(name, labels) { () =>
    ...
  }
  ```

- remove unnecessary Java/Scala collection conversion. Since Scala 2.11 does not support SAM, the extra implicit function is required.

- leverage Logging to defer message evaluation

- UPPER_CASE string constants

### Why are the changes needed?

Improve code quality and performance(maybe)

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass GA.

Closes #1670 from pan3793/CELEBORN-757.

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: zky.zhoukeyong <zky.zhoukeyong@alibaba-inc.com>
2023-07-03 11:56:43 +08:00
..
benchmarks [CELEBORN-744] Add Benchmark framework and ComputeIfAbsentBenchmark 2023-06-29 20:19:30 +08:00
src [CELEBORN-757] Improve metrics method signature and code style 2023-07-03 11:56:43 +08:00
pom.xml [CELEBORN-666] Define protobuf-maven-plugin in the root pom.xml 2023-06-12 19:46:46 +08:00