Fix lint issues after enable BLACK (#10717)

Summary:
As title

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10717

Test Plan:
Unit Tests
CI

Reviewed By: riversand963

Differential Revision: D39700707

Pulled By: gitbw95

fbshipit-source-id: 54de27e695535a50159f5f6467da36aaf21bebae
main
Bo Wang 2 years ago committed by Facebook GitHub Bot
parent 749b849a34
commit dd40f83e95
  1. 4
      build_tools/benchmark_log_tool.py
  2. 10
      tools/advisor/advisor/db_stats_fetcher.py
  3. 10
      tools/advisor/advisor/db_timeseries_parser.py

@ -141,7 +141,9 @@ class ResultParser:
row.append("") row.append("")
line = line[len(intra) :] line = line[len(intra) :]
else: else:
raise BenchmarkResultException("Invalid TSV line", f"{line_in} at {line}") raise BenchmarkResultException(
"Invalid TSV line", f"{line_in} at {line}"
)
return row return row
def parse(self, lines): def parse(self, lines):

@ -299,8 +299,14 @@ class OdsStatsFetcher(TimeSeriesData):
reqd_stats.append(key) reqd_stats.append(key)
return reqd_stats return reqd_stats
def fetch_rate_url(self, entities: List[str], keys: List[str], def fetch_rate_url(
window_len: str, percent: str, display: bool) -> str: self,
entities: List[str],
keys: List[str],
window_len: str,
percent: str,
display: bool,
) -> str:
transform_desc = ( transform_desc = (
"rate(" + str(window_len) + ",duration=" + str(self.duration_sec) "rate(" + str(window_len) + ",duration=" + str(self.duration_sec)
) )

@ -44,8 +44,14 @@ class TimeSeriesData(DataSource):
# for each of them and populates the 'keys_ts' dictionary # for each of them and populates the 'keys_ts' dictionary
pass pass
def fetch_burst_epochs(self, entities: str, statistic: int, def fetch_burst_epochs(
window_sec: float, threshold: bool, percent: bool) -> Dict[str, Dict[int, float]]: self,
entities: str,
statistic: int,
window_sec: float,
threshold: bool,
percent: bool,
) -> Dict[str, Dict[int, float]]:
# this method calculates the (percent) rate change in the 'statistic' # this method calculates the (percent) rate change in the 'statistic'
# for each entity (over 'window_sec' seconds) and returns the epochs # for each entity (over 'window_sec' seconds) and returns the epochs
# where this rate change is greater than or equal to the 'threshold' # where this rate change is greater than or equal to the 'threshold'

Loading…
Cancel
Save