-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstats.c
More file actions
36 lines (26 loc) · 725 Bytes
/
stats.c
File metadata and controls
36 lines (26 loc) · 725 Bytes
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
31
32
33
34
35
36
https://powcoder.com
代写代考加微信 powcoder
Assignment Project Exam Help
Add WeChat powcoder
// stats.c ... show statistics for a Relation
// part of Multi-attribute linear-hashed files
// Show info and page stats for a Relation
// Usage: ./stats RelName
#include "defs.h"
#include "reln.h"
#define USAGE "./stats RelName"
// Main ... process args, run query
int main(int argc, char **argv)
{
// process command-line args
if (argc < 2) fatal(USAGE);
char *relname = argv[1];
// open relation and show stats
if (!existsRelation(relname))
fatal("No such relation\n");
Reln r = openRelation(relname,"r");
if (r == NULL) fatal("No such relation");
relationStats(r);
closeRelation(r);
return 0;
}