Add benchmarks comparison job
This commit is contained in:
parent
b78729369d
commit
8dbc85fab7
2
.github/workflows/osrm-backend.yml
vendored
2
.github/workflows/osrm-backend.yml
vendored
@ -615,7 +615,7 @@ jobs:
|
||||
- name: Enable compiler cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.ccache
|
||||
paths: ["~/.ccache", "~/.cache/ccache"]
|
||||
key: v1-ccache-benchmarks-${{ github.sha }}
|
||||
restore-keys: |
|
||||
v1-ccache-benchmarks-
|
||||
|
@ -14,9 +14,9 @@ def create_markdown_table(results):
|
||||
header = "| Benchmark | Base | PR |\n|-----------|------|----|"
|
||||
rows = []
|
||||
for result in results:
|
||||
base = result['base'].replace('\n', '<br>')
|
||||
pr = result['pr'].replace('\n', '<br>')
|
||||
row = f"| {result['name']} | ```{base}``` | ```{pr}``` |"
|
||||
base = result['base']
|
||||
pr = result['pr']
|
||||
row = f"| {result['name']} | ```\n{base}\n``` | ```\n{pr}\n``` |"
|
||||
rows.append(row)
|
||||
return f"{header}\n" + "\n".join(rows)
|
||||
|
||||
|
@ -64,7 +64,7 @@ int main(int, char **)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
TIMER_STOP(aliased_u32);
|
||||
util::Log() << "aliased u32: " << TIMER_MSEC(aliased_u32);
|
||||
std::cout << "aliased u32: " << TIMER_MSEC(aliased_u32) << std::endl;
|
||||
|
||||
TIMER_START(plain_u32);
|
||||
for (auto round : util::irange(0, num_rounds))
|
||||
@ -83,7 +83,7 @@ int main(int, char **)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
TIMER_STOP(plain_u32);
|
||||
util::Log() << "plain u32: " << TIMER_MSEC(plain_u32);
|
||||
std::cout << "plain u32: " << TIMER_MSEC(plain_u32) << std::endl;
|
||||
|
||||
TIMER_START(aliased_double);
|
||||
for (auto round : util::irange(0, num_rounds))
|
||||
@ -103,7 +103,7 @@ int main(int, char **)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
TIMER_STOP(aliased_double);
|
||||
util::Log() << "aliased double: " << TIMER_MSEC(aliased_double);
|
||||
std::cout << "aliased double: " << TIMER_MSEC(aliased_double) << std::endl;
|
||||
|
||||
TIMER_START(plain_double);
|
||||
for (auto round : util::irange(0, num_rounds))
|
||||
@ -123,5 +123,5 @@ int main(int, char **)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
TIMER_STOP(plain_double);
|
||||
util::Log() << "plain double: " << TIMER_MSEC(plain_double);
|
||||
std::cout << "plain double: " << TIMER_MSEC(plain_double) << std::endl;
|
||||
}
|
||||
|
@ -72,10 +72,10 @@ int main(int, char **)
|
||||
|
||||
auto write_slowdown = result_packed.random_write_ms / result_plain.random_write_ms;
|
||||
auto read_slowdown = result_packed.random_read_ms / result_plain.random_read_ms;
|
||||
util::Log() << "random write: std::vector " << result_plain.random_write_ms
|
||||
std::cout << "random write: std::vector " << result_plain.random_write_ms
|
||||
<< " ms, util::packed_vector " << result_packed.random_write_ms << " ms. "
|
||||
<< write_slowdown;
|
||||
util::Log() << "random read: std::vector " << result_plain.random_read_ms
|
||||
<< write_slowdown << std::endl;
|
||||
std::cout << "random read: std::vector " << result_plain.random_read_ms
|
||||
<< " ms, util::packed_vector " << result_packed.random_read_ms << " ms. "
|
||||
<< read_slowdown;
|
||||
<< read_slowdown << std::endl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user