Skip to content

Commit 4c15eba

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 0004628 + 984876a commit 4c15eba

File tree

81 files changed

+1770
-375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1770
-375
lines changed

frameworks/C++/paozhu/paozhu.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ RUN mkdir ./paozhu/orm/include
9494

9595

9696
COPY ./paozhu_benchmark/orm/orm.h ./paozhu/orm/
97-
COPY ./paozhu_benchmark/orm/include/fortunebase.h ./paozhu/orm/include/
98-
COPY ./paozhu_benchmark/orm/include/worldbase.h ./paozhu/orm/include/
97+
COPY ./paozhu_benchmark/orm/include/fortune_base.h ./paozhu/orm/include/
98+
COPY ./paozhu_benchmark/orm/include/world_base.h ./paozhu/orm/include/
9999
COPY ./paozhu_benchmark/orm/include/fortune_mysql.h ./paozhu/orm/include/
100100
COPY ./paozhu_benchmark/orm/include/world_mysql.h ./paozhu/orm/include/
101101

frameworks/C++/paozhu/paozhu_benchmark/controller/src/techempower.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ asio::awaitable<std::string> techempowercached_queries(std::shared_ptr<httppeer>
166166
auto myworld = orm::World();
167167
std::string mycacheid = "alldatacache";
168168

169-
pzcache<std::vector<orm::worldbase::meta>> &temp_cache = pzcache<std::vector<orm::worldbase::meta>>::conn();
169+
pzcache<std::vector<orm::world_base::meta>> &temp_cache = pzcache<std::vector<orm::world_base::meta>>::conn();
170170

171-
std::vector<orm::worldbase::meta> allcachedata_array;
171+
std::vector<orm::world_base::meta> allcachedata_array;
172172
allcachedata_array.reserve(10000);
173173
//create rand data to cache
174174
if (temp_cache.check(mycacheid) > -1)
@@ -227,7 +227,7 @@ asio::awaitable<std::string> techempowercached_db(std::shared_ptr<httppeer> peer
227227
auto myworld = orm::World();
228228
std::string mycacheid = "my" + std::to_string(get_num);
229229

230-
pzcache<std::vector<orm::worldbase::meta>> &temp_cache = pzcache<std::vector<orm::worldbase::meta>>::conn();
230+
pzcache<std::vector<orm::world_base::meta>> &temp_cache = pzcache<std::vector<orm::world_base::meta>>::conn();
231231

232232
myworld.record.reserve(get_num);
233233
if (temp_cache.check(mycacheid) > -1)

frameworks/C++/paozhu/paozhu_benchmark/models/Fortune.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
#include "fortune_mysql.h"
3-
#include "fortunebase.h"
3+
#include "fortune_base.h"
44
#include "Fortune.h"
55

66
/* 如果此文件存在不会自动覆盖,没有则会自动生成。

frameworks/C++/paozhu/paozhu_benchmark/models/World.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
#include "world_mysql.h"
3-
#include "worldbase.h"
3+
#include "world_base.h"
44
#include "World.h"
55

66
/* 如果此文件存在不会自动覆盖,没有则会自动生成。

frameworks/C++/paozhu/paozhu_benchmark/models/include/Fortune.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#ifndef ORM_DEFAULT_FORTUNE_H
22
#define ORM_DEFAULT_FORTUNE_H
33
#include "fortune_mysql.h"
4-
#include "fortunebase.h"
4+
#include "fortune_base.h"
55

66
/* 如果此文件存在不会自动覆盖,没有则会自动生成。
77
*If this file exists, it will not be overwritten automatically. If not, it will be generated automatically. */
88

99
namespace orm {
10-
class Fortune : public fortune_mysql<Fortune,fortunebase>{
10+
class Fortune : public fortune_mysql<Fortune,fortune_base>{
1111
public:
1212
Fortune(std::string dbtag);
1313
Fortune();

frameworks/C++/paozhu/paozhu_benchmark/models/include/World.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#ifndef ORM_DEFAULT_WORLD_H
22
#define ORM_DEFAULT_WORLD_H
33
#include "world_mysql.h"
4-
#include "worldbase.h"
4+
#include "world_base.h"
55

66
/* 如果此文件存在不会自动覆盖,没有则会自动生成。
77
*If this file exists, it will not be overwritten automatically. If not, it will be generated automatically. */
88

99
namespace orm {
10-
class World : public world_mysql<World,worldbase>{
10+
class World : public world_mysql<World,world_base>{
1111
public:
1212
World(std::string dbtag);
1313
World();

frameworks/C++/paozhu/paozhu_benchmark/orm/include/fortunebase.h renamed to frameworks/C++/paozhu/paozhu_benchmark/orm/include/fortune_base.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define ORM_DEFAULT_FORTUNEBASEMATA_H
33
/*
44
*This file is auto create from paozhu_cli
5-
*本文件为自动生成 Tue, 08 Apr 2025 07:55:59 GMT
5+
*本文件为自动生成 Sat, 26 Apr 2025 15:58:21 GMT
66
***/
77
#include <iostream>
88
#include <cstdio>
@@ -19,19 +19,19 @@
1919
namespace orm {
2020

2121

22-
struct fortunebase
22+
struct fortune_base
2323
{
2424
struct meta{
2525
unsigned int id = 0; ///**/
2626
std::string message = ""; ///**/
2727
} data;
28-
std::vector<fortunebase::meta> record;
28+
std::vector<fortune_base::meta> record;
2929
std::string _rmstag="default";//this value must be default or tag value, tag in mysqlconnect config file .
3030
unsigned int _offset=0;
31-
std::vector<fortunebase::meta>::iterator begin(){ return record.begin(); }
32-
std::vector<fortunebase::meta>::iterator end(){ return record.end(); }
33-
std::vector<fortunebase::meta>::const_iterator begin() const{ return record.begin(); }
34-
std::vector<fortunebase::meta>::const_iterator end() const{ return record.end(); }
31+
std::vector<fortune_base::meta>::iterator begin(){ return record.begin(); }
32+
std::vector<fortune_base::meta>::iterator end(){ return record.end(); }
33+
std::vector<fortune_base::meta>::const_iterator begin() const{ return record.begin(); }
34+
std::vector<fortune_base::meta>::const_iterator end() const{ return record.end(); }
3535
static constexpr std::array<std::string_view,2> col_names={"id","message"};
3636
static constexpr std::array<unsigned char,2> col_types={3,253};
3737
static constexpr std::array<unsigned char,2> col_length={0,0};
@@ -75,7 +75,7 @@ break;
7575
record.clear();
7676
}
7777
void data_reset(){
78-
fortunebase::meta metatemp;
78+
fortune_base::meta metatemp;
7979
data = metatemp;
8080
}
8181

@@ -610,7 +610,7 @@ tempsql<<"\"message\":\""<<http::utf8_to_jsonstring(data.message)<<"\"";
610610
void from_json(const std::string &json_content)
611611
{
612612
record.clear();
613-
fortunebase::meta metatemp;
613+
fortune_base::meta metatemp;
614614
data=metatemp;
615615
unsigned int json_offset=0;
616616
bool isarray=false;
@@ -1057,14 +1057,14 @@ tempsql<<"\"message\":\""<<http::utf8_to_jsonstring(record[n].message)<<"\"";
10571057
void setMessage( std::string &val){ data.message=val;}
10581058
void setMessage(std::string_view val){ data.message=val;}
10591059

1060-
fortunebase::meta getnewData(){
1060+
fortune_base::meta getnewData(){
10611061
struct meta newdata;
10621062
return newdata;
10631063
}
1064-
fortunebase::meta getData(){
1064+
fortune_base::meta getData(){
10651065
return data;
10661066
}
1067-
std::vector<fortunebase::meta> getRecord(){
1067+
std::vector<fortune_base::meta> getRecord(){
10681068
return record;
10691069
}
10701070

@@ -1145,7 +1145,7 @@ std::vector<fortunebase::meta> getRecord(){
11451145
}
11461146

11471147
template<typename T, typename std::enable_if<std::is_integral_v<T>,bool>::type = true >
1148-
T getVal([[maybe_unused]] fortunebase::meta & iter,[[maybe_unused]] std::string keyname)
1148+
T getVal([[maybe_unused]] fortune_base::meta & iter,[[maybe_unused]] std::string keyname)
11491149
{
11501150

11511151

@@ -1179,7 +1179,7 @@ std::vector<fortunebase::meta> getRecord(){
11791179
}
11801180

11811181
template<typename T, typename std::enable_if<std::is_floating_point_v<T>,bool>::type = true >
1182-
T getVal([[maybe_unused]] fortunebase::meta & iter,std::string keyname)
1182+
T getVal([[maybe_unused]] fortune_base::meta & iter,std::string keyname)
11831183
{
11841184
unsigned char kpos;
11851185
kpos=findcolpos(keyname);
@@ -1211,7 +1211,7 @@ std::vector<fortunebase::meta> getRecord(){
12111211
}
12121212

12131213
template<typename T, typename std::enable_if<std::is_same<T,std::string>::value,bool>::type = true >
1214-
std::string getVal([[maybe_unused]] fortunebase::meta & iter,std::string keyname)
1214+
std::string getVal([[maybe_unused]] fortune_base::meta & iter,std::string keyname)
12151215
{
12161216

12171217
unsigned char kpos;

0 commit comments

Comments
 (0)