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
|
- name: Enable compiler cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/.ccache
|
paths: ["~/.ccache", "~/.cache/ccache"]
|
||||||
key: v1-ccache-benchmarks-${{ github.sha }}
|
key: v1-ccache-benchmarks-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
v1-ccache-benchmarks-
|
v1-ccache-benchmarks-
|
||||||
|
@ -14,9 +14,9 @@ def create_markdown_table(results):
|
|||||||
header = "| Benchmark | Base | PR |\n|-----------|------|----|"
|
header = "| Benchmark | Base | PR |\n|-----------|------|----|"
|
||||||
rows = []
|
rows = []
|
||||||
for result in results:
|
for result in results:
|
||||||
base = result['base'].replace('\n', '<br>')
|
base = result['base']
|
||||||
pr = result['pr'].replace('\n', '<br>')
|
pr = result['pr']
|
||||||
row = f"| {result['name']} | ```{base}``` | ```{pr}``` |"
|
row = f"| {result['name']} | ```\n{base}\n``` | ```\n{pr}\n``` |"
|
||||||
rows.append(row)
|
rows.append(row)
|
||||||
return f"{header}\n" + "\n".join(rows)
|
return f"{header}\n" + "\n".join(rows)
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ int main(int, char **)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
TIMER_STOP(aliased_u32);
|
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);
|
TIMER_START(plain_u32);
|
||||||
for (auto round : util::irange(0, num_rounds))
|
for (auto round : util::irange(0, num_rounds))
|
||||||
@ -83,7 +83,7 @@ int main(int, char **)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
TIMER_STOP(plain_u32);
|
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);
|
TIMER_START(aliased_double);
|
||||||
for (auto round : util::irange(0, num_rounds))
|
for (auto round : util::irange(0, num_rounds))
|
||||||
@ -103,7 +103,7 @@ int main(int, char **)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
TIMER_STOP(aliased_double);
|
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);
|
TIMER_START(plain_double);
|
||||||
for (auto round : util::irange(0, num_rounds))
|
for (auto round : util::irange(0, num_rounds))
|
||||||
@ -123,5 +123,5 @@ int main(int, char **)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
TIMER_STOP(plain_double);
|
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 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;
|
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. "
|
<< " ms, util::packed_vector " << result_packed.random_write_ms << " ms. "
|
||||||
<< write_slowdown;
|
<< write_slowdown << std::endl;
|
||||||
util::Log() << "random read: std::vector " << result_plain.random_read_ms
|
std::cout << "random read: std::vector " << result_plain.random_read_ms
|
||||||
<< " ms, util::packed_vector " << result_packed.random_read_ms << " 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