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. 6
      build_tools/benchmark_log_tool.py
  2. 10
      tools/advisor/advisor/db_stats_fetcher.py
  3. 10
      tools/advisor/advisor/db_timeseries_parser.py
  4. 2
      tools/db_crashtest.py

@ -98,7 +98,7 @@ class BenchmarkUtils:
# e.g. 2022-07-1T00:14:55 should be 2022-07-01T00:14:55
row["test_date"] = dt.isoformat()
row["date"] = dt.isoformat()
return {key.replace(".", "_") : value for key, value in row.items()}
return {key.replace(".", "_"): value for key, value in row.items()}
class ResultParser:
@ -141,7 +141,9 @@ class ResultParser:
row.append("")
line = line[len(intra) :]
else:
raise BenchmarkResultException("Invalid TSV line", f"{line_in} at {line}")
raise BenchmarkResultException(
"Invalid TSV line", f"{line_in} at {line}"
)
return row
def parse(self, lines):

@ -299,8 +299,14 @@ class OdsStatsFetcher(TimeSeriesData):
reqd_stats.append(key)
return reqd_stats
def fetch_rate_url(self, entities: List[str], keys: List[str],
window_len: str, percent: str, display: bool) -> str:
def fetch_rate_url(
self,
entities: List[str],
keys: List[str],
window_len: str,
percent: str,
display: bool,
) -> str:
transform_desc = (
"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
pass
def fetch_burst_epochs(self, entities: str, statistic: int,
window_sec: float, threshold: bool, percent: bool) -> Dict[str, Dict[int, float]]:
def fetch_burst_epochs(
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'
# for each entity (over 'window_sec' seconds) and returns the epochs
# where this rate change is greater than or equal to the 'threshold'

@ -471,7 +471,7 @@ multiops_wp_txn_params = {
def finalize_and_sanitize(src_params):
dest_params = {k : v() if callable(v) else v for (k, v) in src_params.items()}
dest_params = {k: v() if callable(v) else v for (k, v) in src_params.items()}
if is_release_mode():
dest_params["read_fault_one_in"] = 0
if dest_params.get("compression_max_dict_bytes") == 0:

Loading…
Cancel
Save