Solving timestamps and serialization merge
Change-Id: Icd14e49c06b19e4334adbdb98efed54af029b95b
[ROCm/rocprofiler commit: def7fa710a]
Tento commit je obsažen v:
@@ -20,6 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
#include "test_utils.h"
|
||||
#include <regex>
|
||||
|
||||
namespace rocprofiler {
|
||||
namespace tests {
|
||||
@@ -130,10 +131,6 @@ void tokenize_tracer_output(std::string line, tracer_kernel_info_t& kinfo) {
|
||||
std::getline(tokenStream, token, ',');
|
||||
kinfo.function = token;
|
||||
std::getline(tokenStream, token, ',');
|
||||
kinfo.operation = token;
|
||||
std::getline(tokenStream, token, ',');
|
||||
kinfo.kernel_name = token;
|
||||
std::getline(tokenStream, token, ',');
|
||||
kinfo.begin_time = token;
|
||||
std::getline(tokenStream, token, ',');
|
||||
kinfo.end_time = token;
|
||||
@@ -145,6 +142,19 @@ void tokenize_tracer_output(std::string line, tracer_kernel_info_t& kinfo) {
|
||||
kinfo.roxtx_msg = token;
|
||||
}
|
||||
|
||||
// get numeric value of timestamp token
|
||||
uint64_t get_timestamp_value(const std::string& str) {
|
||||
std::regex pattern("(\\d+)");
|
||||
std::smatch match;
|
||||
|
||||
if (regex_search(str, match, pattern)) {
|
||||
return stoul(match[1]);
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace utility
|
||||
} // namespace tests
|
||||
} // namespace rocprofiler
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele