Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
 
#pragma once
#include <stdlib.h>
 
#include "OrtValueList.h"
 
namespace onnxruntime {
namespace perftest {
 
struct RunTiming {
  std::chrono::duration<double> submit_timing = std::chrono::seconds(0);
  std::chrono::duration<double> total_timing = std::chrono::seconds(0);
  size_t test_input_index = 0;  // which test_inputs_ entry was used
};
 
class TestSession {
 public:
  virtual RunTiming Run() = 0;
  // TODO: implement it
  // This function won't return duration, because it may vary largely.
  // Please measure the perf at a higher level.
  void ThreadSafeRun() { abort(); }
  virtual void PreLoadTestData(size_t test_data_id, size_t input_id, Ort::Value&& value) = 0;
 
  virtual ~TestSession() = default;
};
}  // namespace perftest
}  // namespace onnxruntime