Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Initial check-in of a test VFS designed to simulate a NAND-flash SSD for the purpose of measuring and subsequently minimizing write amplification caused by SQLite. The code in this check-in compiles but does not run. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | ssdsim |
Files: | files | file ages | folders |
SHA1: |
9e6efcf05402cd0b259c9b2ae57e3498 |
User & Date: | drh 2012-10-25 01:50:59.924 |
Context
2012-10-25
| ||
15:32 | Merge the command-line shell enhancements from trunk. Other edits toward trying to get ssdsim to run. (check-in: 848f87e22f user: drh tags: ssdsim) | |
01:50 | Initial check-in of a test VFS designed to simulate a NAND-flash SSD for the purpose of measuring and subsequently minimizing write amplification caused by SQLite. The code in this check-in compiles but does not run. (check-in: 9e6efcf054 user: drh tags: ssdsim) | |
2012-10-19
| ||
02:10 | Make sure substructure elements have proper alignment in the ICU tokenizers of FTS2 and FTS3. (check-in: aaa2d9b0db user: drh tags: trunk) | |
Changes
Changes to src/shell.c.
︙ | |||
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 | 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 | + + + + | char *zErrMsg = sqlite3_malloc(nErrMsg); if( zErrMsg ){ memcpy(zErrMsg, sqlite3_errmsg(db), nErrMsg); } return zErrMsg; } #ifdef SQLITE_ENABLE_SSDSIM extern void ssdsim_report(FILE*, int); #endif /* ** Display memory stats. */ static int display_stats( sqlite3 *db, /* Database to query */ struct callback_data *pArg, /* Pointer to struct callback_data */ int bReset /* True to reset the stats */ |
︙ | |||
2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 | 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 | + + + | } if( nArg >= 3) { strncpy(continuePrompt,azArg[2],(int)ArraySize(continuePrompt)-1); } }else if( c=='q' && strncmp(azArg[0], "quit", n)==0 && nArg==1 ){ #ifdef SQLITE_ENABLE_SSDSIM ssdsim_report(p->out, 0); #endif rc = 2; }else if( c=='r' && n>=3 && strncmp(azArg[0], "read", n)==0 && nArg==2 ){ FILE *alt = fopen(azArg[1], "rb"); if( alt==0 ){ fprintf(stderr,"Error: cannot open \"%s\"\n", azArg[1]); |
︙ | |||
2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 | 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 | + + + + + | vfstrace_register("trace",0,(int(*)(const char*,void*))fputs,stderr,1); #endif #ifdef SQLITE_ENABLE_MULTIPLEX }else if( strcmp(z,"-multiplex")==0 ){ extern int sqlite3_multiple_initialize(const char*,int); sqlite3_multiplex_initialize(0, 1); #endif #ifdef SQLITE_ENABLE_SSDSIM }else if( strcmp(z, "-ssdsim")==0 ){ extern int ssdsim_register(const char*,const char*,int); ssdsim_register(0, argv[++i], 1); #endif }else if( strcmp(z,"-vfs")==0 ){ sqlite3_vfs *pVfs = sqlite3_vfs_find(argv[++i]); if( pVfs ){ sqlite3_vfs_register(pVfs, 1); }else{ fprintf(stderr, "no such VFS: \"%s\"\n", argv[i]); exit(1); |
︙ | |||
3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 | 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 | + + + + | #ifdef SQLITE_ENABLE_VFSTRACE }else if( strcmp(z,"-vfstrace")==0 ){ i++; #endif #ifdef SQLITE_ENABLE_MULTIPLEX }else if( strcmp(z,"-multiplex")==0 ){ i++; #endif #ifdef SQLITE_ENABLE_SSDSIM }else if( strcmp(z,"-ssdsim")==0 ){ i++; #endif }else if( strcmp(z,"-help")==0 ){ usage(1); }else if( strcmp(z,"-cmd")==0 ){ if( i==argc-1 ) break; i++; z = argv[i]; |
︙ |
Added src/test_ssdsim.c.